Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My regen script has stopped working how do i make it work again?

I have a plane crash into the sea game (no it is not copied but it is built on a copy) and the regen script is not working anymore.

code:

while true do
model = game.Workspace.Plane1
messageText = "Flight 55 is at the Gate!"

message = Instance.new("Message")
message.Text = messageText
backup = model:clone()

while true do
	wait(100)

	message.Parent = game.Workspace
	model:Remove()

	wait(4)
	
	model = backup:clone()
	model.Parent = game.Workspace
	model:makeJoints()
	message.Parent = nil
end

game link www.roblox.com/games/262967526/Survive-a-Plane-Crash-Into-the-Sea

1 answer

✓ Accepted answer

You have two whiletruedo loops, but only one ending line.

When to know when to put an end? Well, an easy way to know...You need to insert an end at every arrow symbol you see at the left next to the line number. It signifies ending a block of code.

It is also to be noted that Remove() has been deprecated, and you should use Destroy() instead.

Next time, please post your output.

while true do
model = game.Workspace.Plane1
messageText = "Flight 55 is at the Gate!"

message = Instance.new("Message")
message.Text = messageText
backup = model:clone()

while true do
    wait(100)

    message.Parent = game.Workspace
    model:Destroy()

    wait(4)

    model = backup:clone()
    model.Parent = game.Workspace
    model:makeJoints()
    message.Parent = nil
end
end

That code works, but I'm not sure it does exactly what you want it to do...

1 comment

0

im a new scripter so thanks for the help :D

This discussion is preserved as it was. New answers, comments, and votes are closed.