Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there anyway to load the value in a script?

Asked by
DevingDev 346 Moderation Voter
8 years ago
Edited 8 years ago

so i get this blue line under "Units" so i wounder how do i load the Units value cus it only exist in the player when that player is playing. But if i do "Units = game.Players.LocalPlayer" then i get and i dont know heres the script.

14:23:07.646 - Value is not a valid member of Player
Units = game.Players.LocalPlayer
Button = script.Parent.TextButton
Player = game.Players.LocalPlayer
Button.MouseButton1Down:connect(function()
    Player.leaderstats.Units.Value = Player.leaderstats.Units.Value + 1
    if Units.Value == 50 then
        script.Parent.Script.Disabled = true
    end
end)

1 answer

Log in to vote
0
Answered by 8 years ago

Do

Local Units = game.Players.LocalPlayer
0
it still gives me this error "14:29:32.896 - Value is not a valid member of Player" DevingDev 346 — 8y
0
got it working DevingDev 346 — 8y
Ad

Answer this question