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

Can any one help with workspase LocalPlayer?

Asked by 4 years ago

game:GetService("Workspace").LocalPlayer.Tool02["GunScript_Server"].Ammo:Remove()

Its doesnt work, can any one help?? When i use script roblox say that: cant find localplayer! Pls help

0
You don't use localplayer on a server script. broham896 54 — 4y
0
Indeed. LocalPlayer can only be called from a local script. Local scripts are typically called from the client, so putting the script in a place such as StarterPlayerScripts would be a good idea. appxritixn 2235 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

``~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~ local plr = game.Players.LocalPlayer local character = plr.Character character.Tool02.GunScript_Server.Ammo:Destroy() ``

0
Thank you so much!!! It works!!! Kalinka008 2 — 4y
Ad

Answer this question