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

How would I create a hint from a script?

Asked by 10 years ago

I am attempting a launch procedure script that will launch a rocket fired from explosions with the DestroyJointRadiusPercent feature and am wondering is it possible to make it add a hint at the top of the screen saying it is ready to launch and when it has launched?

Here is the code for it that I have so far:

print("Script Active. Waiting Launch.") --Notification to the console that it is active and ready.

Main = game.Workspace.Rocket.RocketModel.Head
Booster = game.Workspace.Rocket.RocketModel.Booster

function onClicked()
    explosion = Instance.new("Explosion")
    explosion.BlastRadius = 50
    explosion.BlastPressure = 1000
    explosion.DestroyJointRadiusPercent = 0
    explosion.Position = Booster.Position
    explosion.Parent = game.Workspace
    wait(1)
    explosion = Instance.new("Explosion")
    explosion.BlastRadius = 50
    explosion.BlastPressure = 1000
    explosion.DestroyJointRadiusPercent = 0
    explosion.Position = Booster.Position
if
    Main.Velocity.y > 10000
    then
    wait(2)
    explosion = Instance.new("Explosion")
    explosion.BlastRadius = 50
    explosion.BlastPressure = 750
    explosion.DestroyJointRadiusPercent = 0
    explosion.Position = Booster.Position
else
    explosion = Instance.new("Explosion")
    explosion.BlastRadius = 50
    explosion.BlastPressure = 5000
    explosion.DestroyJointRadiusPercent = 0
    explosion.Position = Booster.Position
repeat

until Main.Velocity.y > 21000
    wait(5)
    if Main.Velocity.y > 20000
        then
        wait(5)
        explosion = Instance.new("Explosion")
        explosion.BlastRadius = 50
        explosion.BlastPressure = 2500
        explosion.DestroyJointRadiusPercent = 0
        explosion.Position = Booster.Position
    else
        explosion = Instance.new("Explosion")
        explosion.BlastRadius = 50
        explosion.BlastPressure = 4750
        explosion.DestroyJointRadiusPercent = 0
        explosion.Position = Booster.Position
    end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

2 answers

Log in to vote
1
Answered by 10 years ago

Hints are quite easy to create

local h = Instance.new("Hint", Workspace) h.Text = "Enter Text Here"

Just change h's text when you need to from the two different stages.

1
Thanks! Helped a lot and got it to work! areiydenfan00 115 — 10y
0
If you put it in PlayerGui, only that player will be able to see it. It sounds like that's what you want. Perci1 4988 — 10y
Ad
Log in to vote
1
Answered by
EFPA223 10
10 years ago
local h Instance.new("Hint",Workspace) h.Text = "This will be a hint"--Change the "This will be a hint" to anything you like
wait(2)--The time between the hints to be displayed
local h Instance.new("Hint",Workspace h.Text = "This will be another hint"--Change the "This will be another hint" as well.

Answer this question