local button = script.Parent
button.MouseButton1Click:Connect(function() local player = game.Players.LocalPlayer local stats = player.leaderstats.Gold.Value print("processing") if stats >= 1000 then local coil = game.ServerStorage.SpeedCoil coil.Parent = game.StarterPack stats = stats-1000
end
end)
it keeps breaking at local coil = ......
Can you help me explain the problem why it keeps breaking. and also this is a gui shop.

2 comments
There are a few problems, but ServerStorage cannot be accessed from the client(a local script). If you need access to SpeedCoil, you'll either need to move its location, or have the Server send SpeedCoil to the client.
very much appreciated for your response.