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

I had help for the guns, but it keeps giving me them if i press twice, three times etc?

how do i stop that?

i have in serverscriptservice 2 scripts, not local, this code

if game.Players.LocalPlayer.Backpack:FindFirstChild("pistol") then return end

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect( function(player) local tool = game.ReplicatedStorage.Pistol tool:Clone().Parent = player.Backpack end )

THE PISTOL IS CHANGED TO TrenchGun in the second one

1 answer

✓ Accepted answer

Assuming this is a local script

if game.Players.LocalPlayer.Backpack:FindFirstChild("gunname") then
return
end

Although I don't suggest using a local script to check this, as exploiters can bypass it.

7 comments

0

where do i put iy

0

Looking at your question from before, put that before firing the remote event.

0

i'll try it

0

it didnt work

0

i put them in the serverscriptservice scripts, is that right

0

Put that in the local script, you can't get the localplayer in a normal script...

0

it still gives me all of the weapons

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