So I am trying to make a surface gui that gives you a weapon when you press the button for the weapon. However the current script I have won't work. The current script I use is one set up for a screen GUI, but how would I change it to work for a surface gui?
cost = 0
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function()
if player.leaderstats.KOs.Value >= cost then
game.ReplicatedStorage.DC15S:FindFirstChild("DC15S"):clone().Parent = player.Backpack
else
script.Parent.Text = "Can't afford"
wait(1)
script.Parent.Text = "DC-15S"
end
end)
This is in a localscript. And yes, I already tried it in a script.

6 comments
What is a NormalScript?
A normal script as in just a script compared to a localscript.
And why is a LocalScript abnormal?
NormalScript = ServerScript
If it bothered you so much then there, I changed it.
Is it for a FE game?