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

Requesting some STEP BY STEP Guide about: how i should write a script?

Asked by
Gigaset39 111
3 years ago

Im making a ”Simon says” type game, is just that i dont want the ”hints” to be on the screen,but i want them to be on a part which has a SurfaceGUI which has a TextLabel in it. now im using that script:

the question is: what i should EXACTLY do , to ”move” the Instance.new('Hint') on that part as a text?

   blue = script.Parent.B
   yellow = script.Parent.Y
   red = script.Parent.R
   green = script.Parent.G

    while true do
hint = Instance.new('Hint')
hint.Parent = workspace
hint.Text = 'Get Ready'
wait(4)
hint.Text = 'RED'
wait(6)
blue.Transparency = 1
blue.CanCollide = false

yellow.Transparency = 1
yellow.CanCollide = false

green.Transparency = 1
green.CanCollide = false
wait(10)
blue.Transparency = 0
blue.CanCollide = true

yellow.Transparency = 0
yellow.CanCollide = true

green.Transparency = 0
green.CanCollide = true

hint.Text = 'BLUE'
wait(6)
red.Transparency = 1
red.CanCollide = false

yellow.Transparency = 1
yellow.CanCollide = false

green.Transparency = 1
green.CanCollide = false
wait(10)    
yellow.Transparency = 0
yellow.CanCollide = true

red.Transparency = 0
red.CanCollide = true

green.Transparency = 0
green.CanCollide = true

hint.Text = 'GREEN'
wait(6)

red.Transparency = 1
red.CanCollide = false

blue.Transparency = 1
blue.CanCollide = false

yellow.Transparency = 1
yellow.CanCollide = false

wait(10)
red.Transparency = 0
red.CanCollide = true

blue.Transparency = 0
blue.CanCollide = true

yellow.Transparency = 0
yellow.CanCollide = true

hint.Text = 'YELLOW'
wait(6)

red.Transparency = 1
red.CanCollide = false

blue.Transparency = 1
blue.CanCollide = false

green.Transparency = 1
green.CanCollide = false

wait(10)
red.Transparency = 0
red.CanCollide = true

blue.Transparency = 0
blue.CanCollide = true

green.Transparency = 0
green.CanCollide = true

end

0
the question is: what i should EXACTLY do , to ”move” the Instance.new('Hint') ( which is the text on the screen) on that part as a text? Gigaset39 111 — 3y
1
Don't repeatedly post the same question over and over again. radiant_Light203 1166 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

Instead of creating a hint object, just point the hint variable to the text label in the surface gui.

local hint = workspace.part.surfacegui.textlabel
hint.Text = "Lorem ipsum"
0
Thanks,it works, Im sooo NOOB. :D Gigaset39 111 — 3y
0
local hint = workspace.part.SurfaceGui.TextLabel hint.Text = "Get ready" Gigaset39 111 — 3y
Ad

Answer this question