game.Workspace.Guns.Changed:connect(function(t) if t == "Start" then local Player = game:GetService("Players").LocalPlayer local Item = game:GetService("ReplicatedStorage").Pistol:Clone() Item.Parent = Player.Backpack end end)
In another script, I have something to change the Gun Value to "Start"
Oh, its in LocalScript too
Is filtering enabled? If so, make sure you are changing the Guns value client-side. If not then add some prints to see where the script stops. (Like 1 every line). So something like:
game.Workspace.Guns.Changed:connect(function(t) print("Value Changed") if t == "Start" then print("Value = Start") local Player = game:GetService("Players").LocalPlayer local Item = game:GetService("ReplicatedStorage").Pistol:Clone() print("Player defined, item cloned") Item.Parent = Player.Backpack print("Item parented") end end)
Try putting it in ServerStorage.
ServerScriptService will work?
Have you tryed putting
game.Workspace.Guns.Changed:connect(function(t) if t == "Start" then local Player = game:GetService("Players").LocalPlayer local Item = game:GetService("Lighting").Pistol:Clone() -- Changed to lighting. Remember to put the gun in there as well. Item.Parent = Player.Backpack end end)