Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can any one help with workspase LocalPlayer?

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

2 comments

0

You don't use localplayer on a server script.

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.

1 answer

✓ Accepted answer

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

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

1 comment

0

Thank you so much!!! It works!!!

This discussion is preserved as it was. New answers, comments, and votes are closed.