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

Why it's not working?

here is my script:

script.Parent.MouseButton1Click:connect(function()  --- this function is working
	game.Workspace.GameMessage.Text="Carrots are fruits."
	Wait(3)
	game.Workspace.GameMessage.Text=""
end)

wait(11)
function divider()
	local div = game.Workspace.Divider.Door
	local fal = game.Workspace.False.Door
	
	div.Transparency= 0.75   ----- working
	div.CanColide= true
	wait(1)
	
	fal.Transparency= 0.5     ---- from here it doesn't work
	fal.CanCollide= false
	wait(5)
	fal.Transparency= 0
	fal.CanCollide= true
		
	wait(1)
	div.Transparency= 1
	div.CanColide= false
end

divider()

it is half working, thanks for all the helpers!

1 answer

It would be helpful if you specified what was working but I am assuming that the message part is messed up. Try:

script.Parent.MouseButton1Click:connect(function()
	m = Instance.new("Message", Workspace) 
		m.Text = "Carrots are fruits."
			wait(3) --Lua is case-sensitive
				m: Destory() --Destroys the message. Otherwise I think there would just be a blank message lingering there forever

Hope I was right, and this helps!

1 comment

0

Still the same, and now the message is not removed

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