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
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
``~~~~~~~~~~~~~~~~~
local plr = game.Players.LocalPlayer
local character = plr.Character
character.Tool02.GunScript_Server.Ammo:Destroy()
``
Thank you so much!!! It works!!!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You don't use localplayer on a server script.
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.