I made a boat shop using a surface gui, and it clones the boat into workspace from replicated storage. But whenever the boat gets cloned into workspace, it all falls apart. I made the surface welds. It works when I don't clone it. Script:
script.Parent.MouseButton1Click:connect(function(buy)
if game.Players.LocalPlayer.leaderstats.Beli.Value >= 50 and game.Players.LocalPlayer.ShipGot.Value == false then
l = game.ReplicatedStorage.Boat:Clone()
l.Parent = game.Workspace
l.Name = ""..game.Players.LocalPlayer.Name
game.Players.LocalPlayer.leaderstats.Beli.Value = game.Players.LocalPlayer.leaderstats.Beli.Value - 50
end
end)

19 comments
Thx
May I get accepted? :D
Oh, i got another problem. (I did accept) the script wont work online.
Any output?
Let me see
says "Workspace.Part.ShipShop.TextButton.Script:2: attempt to index field "LocalPlayer" (a nil value)"
Is this script a Local Script?
Oh nvm! I just checked its a normal script. It needs to be local right?
Yep. And local scripts need to be in either Guis, tools, or hopperbins, or somewhere in a player.
Still wont work...
Hmm, anything else in the output? Or is that it?
let me check
Nope. Nothing in output
ik the problem
What was it?
Wait nvm. I thought i forgot to put it in the storage
Well, how would I know what? :\ ( y' _ ' )y
Well thx for helping.
We should stop commenting now. Bye.