Okay so, I was making a shop gui for my game and I made it so that when you click a button it gives you a tool for a certain amount of currency that I also added into my game. But the problem is, when you buy the tool you the person who's holding the tool can see it, but other players can't see the tool that you're holding.
I'm not sure if this is a bug or if I put something wrong in my script, but heres my script.
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function(click)
if player.leaderstats.Points.Value >= 50 then
player.leaderstats.Points.Value = player.leaderstats.Points.Value - 50
game.ReplicatedStorage.Tools.Flashlight:Clone().Parent = player:WaitForChild("Backpack")
end
end)
I also have another tool with the same script but its a taco.

3 comments
ohhhh okay! tysm!
wait im still very confused, how would I set everything up? I'm really new to this whole scripting stuff.
so do I add a local script to replicated storage and a regular script to serverscriptservice?