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

Why do my scripts that have game.Players.LocalPlayer not work in game ??

Asked by 6 years ago

So I have some scripts that include the line game.Players.LocalPlayer but in an actual game they wont work. Any idea why ? Heres a script.

local plr = game.Players.LocalPlayer
local GUI = plr.PlayerGui.AFK.AFK
script.Parent.MouseButton1Click:Connect(function()
    plr.AFK.Value = 0
    wait(.1)
    GUI.noAFK.Visible = false
    GUI.AFK.Visible = true
end)

0
Is this a script or a localscript? R_alatch 394 — 6y
0
If this is a regular script it will not work. Read up on localscripts vs scripts lukeb50 631 — 6y
0
ok 1Messi3903 -5 — 6y

Answer this question