【发布时间】:2021-03-29 14:57:05
【问题描述】:
local Player = game.Players.LocalPlayer
local PlayerCash = Player:WaitForChild("leaderstats"):WaitForChild("Strength")
local Mouse = Player:GetMouse()
local amount = 50
script.Parent.Activate:Connect(function()
game.Players.LocalPlayer.leaderstats.money.Value = game.Players.LocalPlayer.leaderstats.money.Value + amount
end)
我正在尝试编写代码以在您单击时给予力量。当我按“播放”时,它不起作用。它在输出中所说的只是 '尝试使用 'Connect' 索引函数。'
【问题讨论】:
-
嘿嘿,请不要发你的代码图片,请将代码复制粘贴到这里,方便大家讨论。
-
我改了:)