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

Requesting script :D - Im Noob- can You help me,please?

Asked by
Gigaset39 111
2 years ago

Hi there! im trying to do a simon says,its just that i want the text to be on a part,not on the screen.. i use this script:

blue = script.Parent.B

yellow = script.Parent.Y

red = script.Parent.R

green = script.Parent.G

 while true do


Hint = script.Parent.Text

wait(4)
Hint = "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

2 answers

Log in to vote
0
Answered by 2 years ago

If you want the text on a Part and not on the Screen then put a "ScreenGUI" inside of the Part you want to have the text on, then add a "TextLabel" inside of ScreenGUI with the above script inside (Assuming the above script works)

0
i new that,is just that i dont know how to corectly write the script: Gigaset39 111 — 2y
0
" Gigaset39 111 — 2y
0
while true do script.Parent.Text = "get ready" script.Parent.TextColor3 = Color3.new(255,0,0) wait(4) Hint = "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 gr Gigaset39 111 — 2y
0
sorry man I'm not a great scripter either, look at AwesomeGamer's answer, that might work WeaponisedPenguins 97 — 2y
Ad
Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

Put this script into your screen. The screen should have a SurfaceGui and a BoolValue named "SimonSays" Inside the SurfaceGui, You should have a TextLabel.

the "local" things you see before the while wait() do loop are variables, These you can put before a script to shorten how much you'll need to type.

local Text = script.Parent.SurfaceGui.TextLabel.Text
local TextProperties = script.Parent.SurfaceGui.TextLabel
TextProperties.RichText = true
TextProperties.TextScaled = true

local TextColor = script.Parent.SurfaceGui.TextLabel.TextColor3
local SimonSays = script.Parent.SimonSays
SimonSays.Value = true

local WaitTime = math.random(10,15) --math.random will pick a number between A and B, Minimum and Maximum, This will come in handy to make random times.
--                           A   B

while wait(WaitTime) do
    if SimonSays.Value == true then --If the BoolValue "SimonSays" is turned on, It'll fire code underneath. If not. It won't do anything.
        local Roll = math.random(1,4) --Rolling Dice, This picks what it'll show.

        if Roll == 1 then --If the dice (local Roll) rolls a 1, It'll fire the script underneath.
            Text = "Red" --Makes Text say "Red"
            TextColor = Color3.fromRGB(255,0,0) --Colors Text Red.
        end

        if Roll == 2 then --If the dice (local Roll) rolls a 2, It'll fire the script underneath.
            Text = "Green" --Makes Text say "Green"
            TextColor = Color3.fromRGB(0,255,0) --Colors Text Green.
        end

        if Roll == 3 then --If the dice (local Roll) rolls a 3, It'll fire the script underneath.
            Text = "Blue" --Makes Text say "Blue"
            TextColor = Color3.fromRGB(0,0,255) --Colors Text Blue.
        end

        if Roll == 4 then --If the dice (local Roll) rolls a 4, It'll fire the script underneath.
            Text = "Yellow" --Makes Text say "Yellow"
            TextColor = Color3.fromRGB(255,255,0) --Colors Text Yellow.
        end
    end
end

Answer this question