Help with buying weapon only works in studio mode?
The buy script below only works in studio mode ;(
I get no errors.
02 | Player = game.Players.LocalPlayer |
03 | local SpeedCoil = game.ServerStorage.Weapons.SpeedCoil |
04 | local Taken = SpeedCoil.Taken |
06 | script.Parent.MouseButton 1 Click:connect( function () |
07 | if Player:FindFirstChild( "leaderstats" ) and Player.leaderstats [ "Gold bars" ] .Value > = Price then |
08 | if Taken.Value = = false then |
09 | Player.leaderstats [ "Gold bars" ] .Value = Player.leaderstats [ "Gold bars" ] .Value - Price |
10 | SpeedCoil:Clone().Parent = Player.Backpack |
11 | SpeedCoil:Clone().Parent = Player.StarterGear |