The script is in a text button, and there is an IntValue in the button. (for the cost) It works with local script, but won't seem to show on other players screens, or run any scripts within it. Can someone help?
player = game.Players.LocalPlayer
DP = player.leaderstats.DamagePoints
price = script.Parent.Cost.Value
tool = script.Parent:FindFirstChild("UpgradedSword")
function buy()
if DP.Value >= price then
DP.Value = DP.Value - price
local a = tool:clone()
a.Parent = player.Backpack
local b = tool:clone()
b.Parent = player.StarterGear
end
end
script.Parent.MouseButton1Down:Connect(buy)

1 comment
Local scripts only work for the client, that player the scripts are in. It won't activate any other players gui's or normal scripts. To activate a normal script, you would have to use a remote event.