Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 3 months ago
Edited 3 months ago

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

Log in to vote
0
Answered by
Pupppy44 671 Moderation Voter
3 months ago

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.

0
where do i put iy ScottRulesAtAnything -1 — 3mo
0
Looking at your question from before, put that before firing the remote event. Pupppy44 671 — 3mo
0
i'll try it ScottRulesAtAnything -1 — 3mo
0
it didnt work ScottRulesAtAnything -1 — 3mo
View all comments (3 more)
0
i put them in the serverscriptservice scripts, is that right ScottRulesAtAnything -1 — 3mo
0
Put that in the local script, you can't get the localplayer in a normal script... Pupppy44 671 — 3mo
0
it still gives me all of the weapons ScottRulesAtAnything -1 — 3mo
Ad

Answer this question