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

Need help ASAP Script keeps crashing over and over again?

I just need help on this simply thing. Please help thanks!

model = game.Workspace.modelnamegoeshere --Change "model" to the name of the model you want to regen.  (IT CAN NOT HAVE CAPS/SPACES.)
messageText = "regening" --Change "regening" to the message you would like to be displayed. (IT CAN NOT HAVE CAPS/SPACES.)

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

while true do
	wait(1) --Change (60) to the number of seconds you would like beetween regenerations.

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

	wait(-10000) --Change (1) to the number of seconds you would like the message to be displayed.

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

All I want to do is delete the message. Also, I just want the model to keep regen. Thanks!

1 answer

Local Script in StarterGui

local model = workspace.Model
local messageText = "Regeneration"

local message = script.Parent.ScreenGui.Frame.TextLabel
local message.Text = messageText

while true do
	wait(1) 
	local model2 = model:Clone()

	message.Visible = true
	model:Destroy()

	wait(0)

	model2.Parent = workspace
	--model2:MakeJoints()
	message.Visible = false
end

Alright, so firstly I cleaned up the script, makeJoints needs the "make" to be capitalized, remove is deprecated in favor of Destroy and messages are deprecated (you will need to use a TextLabel instead) The reason the script is probably crashing is due to you having negative time (which isn't possible)

For this example, make sure you have a ScreenGui in the StarterGui named "ScreenGui", a Frame under this named "Frame" and a TextLabel under this named "TextLabel"

In order to remove the message, just don't use it in the script:

local model = workspace.Model

while true do
	local backup = model:clone()
	wait(1) 

	model:Destroy()

	wait(0)

	backup.Parent = workspace
	--backup:MakeJoints()
end

5 comments

0

Thanks

0

So, use this script?

0

if you don't want the message, then you dont need anything in the starter gui, this can be used as a local or server script

0

But, I just want to make it so when the model reset the message won't pop up saying "Model regening"

0

Never mind i fixed it.

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