ok so i made a shop gui, and made it where if you click things, it gives you them yknow the basic but when it gives me the gun, it doesnt let me kill anyone, like it only kills them on my screen but they dont really die, but if i use :give me all then i can kill them - heres the script
script.Parent.MouseButton1Click:Connect(function() local RS = game:GetService("ReplicatedStorage") local item = RS:WaitForChild("GlockDrum") local player = game.Players.LocalPlayer local cloned = item:Clone() cloned.Parent = player.Backpack end)
Hi, I'm quite the novice especially in roblox but I thought i could share my experience anyways. I'm going to try to be as clear as possible.
THE ISSUE
So my guess is that the shop doesn't run on a server script, what do I mean by that? When you purchase something wich i'm guessing you have written inside a localscript it will grant the player the tool. The issue is that the server does not know about this. Therefor you can't kill anybody cause they don't know the weapon exists.
SOLUTION
Its simple use remote events. They essentially send info from the client to the server, in this case you can make a remote event that grants the player the tool this will make sure that the servers knows about it and can replicate it. This also means the weapon should be able to kill other people. The reason :get all works is because the "admin system" runs in a serverscript therefor it replicates to all players. I hope this was to some help.
-Paragonixy