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

Hints work in studio, but not in-game! Why is that?

Hey guys,

I have recently got a bug where the hints work in the studio testing, but they don't appear when in-game. Does anyone see a problem as unfortunately I don't!

Delay = 20
ZombieAttackTime = 45
Message = Instance.new("Hint")
Message.Parent = workspace

while true do
		for i = 1, Delay*1 do
		Message.Text = "The Next Race will begin in " .. Delay*1-i
		wait(1)
		end
	local msg = Instance.new("Message")
	msg.Parent = game.Workspace
	msg.Text = ("Course : Original by Michael007800")
	wait(5)
	msg:remove()
	local New = Instance.new("Message")
	New.Parent = workspace
	New.Text = "THE RACE HAS BEGUN!!!!!"
	game.Lighting.Map1:clone().Parent = game.Workspace
	script.Sound1:play()
	script.RaceStart1:play()
	script.RaceStart2:play()
	script.RaceStart3:play()
	script.RaceStart4:play()
	script.RaceStart5:play()
	script.Parent.CanCollide = false
	script.Parent.Transparency = 1
	wait(3)
	New:remove()
	wait(2)
	script.Parent.CanCollide = true
	script.Parent.Transparency = 0
		for i = 1, ZombieAttackTime*1 do
		Message.Text = "The Next Race will end in " .. ZombieAttackTime*1-i
		wait(1)
	end
	local New = Instance.new("Message")
	New.Parent = workspace
	New.Text = "THE RACE HAS ENDED!!!!!"
	game.Workspace.Map1:remove()
	script.Sound1:stop()
	script.Parent.CanCollide = true
	script.Parent.Transparency = 0
	wait(3)
	New:remove()
	
	
			for i = 1, Delay*1 do
		Message.Text = "The Next Race will begin in " .. Delay*1-i
		wait(1)
		end
	local msg = Instance.new("Message")
	msg.Parent = game.Workspace
	msg.Text = ("Course : Dark Stadium by darksideday")
	wait(5)
	msg:remove()
	local New = Instance.new("Message")
	New.Parent = workspace
	New.Text = "THE RACE HAS BEGUN!!!!!"
	game.Lighting.Map2:clone().Parent = game.Workspace
	script.Sound2:play()
	script.RaceStart1:play()
	script.RaceStart2:play()
	script.RaceStart3:play()
	script.RaceStart4:play()
	script.RaceStart5:play()
	script.Parent.CanCollide = false
	script.Parent.Transparency = 1
	wait(3)
	New:remove()
	wait(2)
	script.Parent.CanCollide = true
	script.Parent.Transparency = 0
		for i = 1, ZombieAttackTime*1 do
		Message.Text = "The Race will end in " .. ZombieAttackTime*1-i
		wait(1)
	end
	local New = Instance.new("Message")
	New.Parent = workspace
	New.Text = "THE RACE HAS ENDED!!!!!"
	game.Workspace.Map2:remove()
	script.Sound2:stop()
	script.Parent.CanCollide = true
	script.Parent.Transparency = 0
	wait(3)
	New:remove()
	
end 

Thanks in advanced,

Michael

(Due to 10,000 character limit, I had to cut the script down!)

5 comments

0

The Message object is very old and almost everyone has stopped using it due to its bugginess, which could be causing this. Id recommend just putting it in a SurfaceGUI,

0

I will do when I finish off tracks and an happy with everything. I'm using Hints and Messages however ATM as it's just easier.

0

Changed my mind, I'll change to GUIs!

0

You changed it... So everything I did was useless... lol jkjk i'm fine. But messages and hints are not buggy.

0

Yeah, which is why I decied to go back with messages and GUIs. I'm not an advacned enough scripter! :D

1 answer

✓ Accepted answer
Delay = 20
ZombieAttackTime = 45

function hint(text,time) --Hint Function
	local Message = Instance.new("Hint",workspace)
	Message.Text = text
	game:GetService("Debris"):AddItem(Message, time) --Add Item from Debris service
end

function message(text, time) --Message Function
	local msg = Instance.new("Message",workspace)
	msg.Text = text
	game:GetService("Debris"):AddItem(Message, time)--Same thing
end

while true do
        for i = Delay,0,-1 do --Changed this to this format
        hint("The Next Race will begin in " .. i, 1) --Changed the hints into functions
        wait(1)
        end
    message("Course : Original by Michael007800", 5)--Same thing with messages
wait(5)
    message("THE RACE HAS BEGUN!!!!!", 3)
    game.Lighting.Map1:clone().Parent = game.Workspace
    script.Sound1:play()
    script.RaceStart1:play()
    script.RaceStart2:play()
    script.RaceStart3:play()
    script.RaceStart4:play()
    script.RaceStart5:play()
    script.Parent.CanCollide = false
    script.Parent.Transparency = 1
    wait(5)
    script.Parent.CanCollide = true
    script.Parent.Transparency = 0
        for i = 1, ZombieAttackTime*1 do
        Message.Text = "The Next Race will end in " .. ZombieAttackTime*1-i
        wait(1)
    end
    message("THE RACE HAS ENDED!!!!!", 3)
    game.Workspace.Map1:Destroy()
    script.Sound1:stop()
    script.Parent.CanCollide = true
    script.Parent.Transparency = 0
wait(3)

            for i = Delay,0,-1 do
        hint("The Next Race will begin in " ..i,1)
        wait(1)
        end
     message("Course : Dark Stadium by darksideday",5)
wait(5)
    message("THE RACE HAS BEGUN!!!!!", 3)
    game.Lighting.Map2:clone().Parent = game.Workspace
    script.Sound2:play()
    script.RaceStart1:play()
    script.RaceStart2:play()
    script.RaceStart3:play()
    script.RaceStart4:play()
    script.RaceStart5:play()
    script.Parent.CanCollide = false
    script.Parent.Transparency = 1
    wait(5)
    script.Parent.CanCollide = true
    script.Parent.Transparency = 0
        for i = ZombieAttackTime,0,-1 do
       hint("The Race will end in " ..i,1)
        wait(1)
    end
    message("THE RACE HAS ENDED!!!!!",3)
    game.Workspace.Map2:Destroy()
    script.Sound2:stop()
    script.Parent.CanCollide = true
    script.Parent.Transparency = 0
    wait(3)
end 

Hope This Helps!

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