Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I've respawned my dropper. And, it keeps destroying its self?

Asked by 6 years ago

So, i've just recently made a Respawn script for a game i'm making ("Marble Fall"). I would destroy the walls and the "Marbles" fall. And, then i respawn them which works. It just deletes the walls again? I only want the whole dropper to respawn not just the Marbles

Here is the respawn script. This below is inside of a button called "Spawn Walls"

script.Parent.MouseButton1Click:Connect(function()
    local dropper = game.Workspace.Dropper
local dropperc = dropper:Clone()

dropperc.Parent = game.ReplicatedStorage

dropper:Destroy()
print("Respawning Dropper")
wait(5)


dropperc.Parent = game.Workspace


end)

The dropper respawns but then the walls get destroyed too.

Wall Destroy Script

game.ReplicatedStorage.Destoryw.OnServerEvent:Connect(function()
    game.Workspace.Dropper.Walls:Destroy()
end)

Then the button to launch that event is

script.Parent.MouseButton1Click:Connect(function()
    game.ReplicatedStorage.Destoryw:FireServer()
end)

I am not sure what i did wrong. And there is no errors either ("http://prntscr.com/l4k7zr") If anyone could help, that would be awesome! :D Thanks in advance

Game LInk to test for yourself "https://www.roblox.com/games/2440463201/Marble-Fall-ALPHA"

0
are the two buttons mentioned the same button, or different buttons? theking48989987 2147 — 6y
0
and you can't destroy stuff or clone stuff on the client and expect other people to see that, those are local parts and can only be seen by the local player theking48989987 2147 — 6y
0
The 2 buttons are 2 different ones. And, there mentioned desperately. I'm not sure what happened. Plus, this does work with FE I've tested with a friend. bobatmcdownalds -2 — 6y

Answer this question