✓ Accepted answer
First; please use a code block when posting code, and give us context.
Second; always try to make your code neat and index it and everything. Also remember to leave notes for yourself so you can read what you wrote.
If this happens to help, please accept the answer!
Your problem is that you must've used the "clone" wrong. Please give me your error and this would be easier.
EDIT: Move the banks to ReplicatedStorage for this to work.
script.Parent.MouseButton1Click:connect(function()
if game.Players.LocalPlayer.leaderstats.Cash.Value == 100 then
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + 75
script.Parent.Parent.Parent.OPen.Visible = true
script.Parent.Parent.Parent.Sell.Visible = true
local a = game.ReplicatedStorage.houses.House1:Clone()
a.Parent = workspace
script.Parent.Parent:Destroy()
game.ReplicatedStorage.Items.Bank1:Clone()
if game.ReplicatedStorage.Items.Bank2.Parent == game.Workspace then
game.Workspace.Bank2:Destory()
end
end
end)
This isn't tested, but all I saw was that your "if" was in the wrong place! make a new line for that!
2 comments
can u rewrite the script cuz i di it AND IT STILL WONT WORK
I've fixed a few more lines, and it should work now