#how do you end a function like if the function doesn't run in 10 seconds then stop trying to run the

2631 messages · Page 3 of 3 (latest)

pulsar helm
#
        local humanoidTouchEvent = humanoid.Touched:Connect(function(part)
            if part.Parent ~= Folder and not part.Parent:FindFirstChild("Humanoid") then
                if part.Parent:IsA("Accessory") or part.Parent:FindFirstChild("Humanoid") then
                    -- Checks if the thing touched was a player or an accessory since player's may have accessories on
                else
                    humanoid.Health = 0
                end
            end
        end)```
shrewd path
#

Wait so is the floor supposed to kill you still?

pulsar helm
#

somewhere here

pulsar helm
#

thats the goal : )

shrewd path
#

alright

#

can you post the whole script

pulsar helm
#

k

shrewd path
#

ight ima replicate the game

#

for testing

#

So your saying

#

wait

#

where is the gray event even?

pulsar helm
#

umm

#

huh?

pulsar helm
shrewd path
#

like yknow how you said you want there to be a simon says, touch grey without touching the floor?

pulsar helm
#

yes

shrewd path
#

wheres that at

pulsar helm
#

the bottom

#

very bottom

shrewd path
#

oh

#

thats probably why it dont work

#

oh yeah quick question

#

yknow the for loop that plays chooser

#

why is it uh

#

random from 1 to 3?

pulsar helm
#

bruh

#

ok

#

because after a random amount of times the normal colors run the HARD COLROS RUN

#

also

shrewd path
#

ah

#

i see

pulsar helm
#

heres what I got

#
        local function humanoidTouch2(humanoid)
            local humanoidTouchEvent2 = humanoid.Touched:Connect(function(part)
                if part == game.Workspace.SimonGround then
                    humanoid.Health = 0
                end
            end)
            for i = 15, 0, -1 do
                task.wait(1)
                for _, player in pairs(game.Players:GetPlayers()) do
                    player.PlayerGui.ScreenGui.TextLabel.Text = i
                end
            end
            humanoidTouchEvent2:Disconnect()
        end
    else
        for i = 5, 0, -1 do -- 5 Second For loop that counts down
            task.wait(1)
            for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
                player.PlayerGui.ScreenGui.TextLabel.Text = i -- Changes all players Text to equal the countdown time
            end
        end
    end```
shrewd path
#

thank you

pulsar helm
#

your welcome : )

pulsar helm
shrewd path
#

ok

#

in that case

#

You see this line in your code:

if part == game.Workspace.SimonGround then
    humanoid.Health = 0
end
#

you can add on to the if statement

#

by saying the if the part being touched is equal to the simon ground (already done) OR is NOT equal to the gray parts

#

so ima assume you got a grey folder right

pulsar helm
#

huh

shrewd path
#

also mb, I spell grey with an a

#

america

#

yknow what i mean

#
if part == game.Workspace.SimonGround or part ~= game.Workspace.:FindFirstChild(color.."Folder") then
    humanoid.Health = 0
end
pulsar helm
#
        local function humanoidTouch2(humanoid)
            local humanoidTouchEvent2 = humanoid.Touched:Connect(function(part)
                if part == game.Workspace.SimonGround then
                    humanoid.Health = 0
                end
            end)
            for i = 15, 0, -1 do
                task.wait(1)
                for _, player in pairs(game.Players:GetPlayers()) do
                    player.PlayerGui.ScreenGui.TextLabel.Text = i
                end
            end
            local function humanoidTouch3(humanoid)
                local humanoidTouchEvent3 = humanoid.Touched:Connect(function(part)
                    if part ~= Part then
                        humanoid.Health = 0
                    else
                    end
                end)
            humanoidTouchEvent3:Disconnect()
            humanoidTouchEvent2:Disconnect()
            end
        end
    else
        for i = 5, 0, -1 do -- 5 Second For loop that counts down
            task.wait(1)
            for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
                player.PlayerGui.ScreenGui.TextLabel.Text = i -- Changes all players Text to equal the countdown time
            end
        end
    end
    ```
shrewd path
#

i mean

#

that works but its so much more lines

pulsar helm
#

yeah

#

can u simplied it for me\

#

or

#

idk

shrewd path
#
    if color == "Grey" then
        local function humanoidTouch2(humanoid)
            local humanoidTouchEvent2 = humanoid.Touched:Connect(function(part)
                if part == game.Workspace.SimonGround or part ~= game.Workspace.GreyFolder then
                    humanoid.Health = 0
                end
            end)
            for i = 15, 0, -1 do
                task.wait(1)
                for _, player in pairs(game.Players:GetPlayers()) do
                    player.PlayerGui.ScreenGui.TextLabel.Text = i
                end
            end
            humanoidTouchEvent2:Disconnect()
            end
        end
    else
        for i = 5, 0, -1 do -- 5 Second For loop that counts down
            task.wait(1)
            for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
                player.PlayerGui.ScreenGui.TextLabel.Text = i -- Changes all players Text to equal the countdown time
            end
        end
    end
    
#

basically

#

instead of making another touch event to handle the grey part

#

we just make the if statement we already have include the grey part

pulsar helm
#

@shrewd path the players are going to have to parkour onto other parts to get to grey(like floor is lava)

shrewd path
#

oh yeah

#

forgor

pulsar helm
#

heres what I want @shrewd path so when simon says that stuff basically the floor = lava now and u have to parkour onto other parts to grey after 15 seconds every player not on grey will instantly die

shrewd path
#

alright

#

so all parts are fine

#

until

#

the countdown ends

pulsar helm
#

yup

shrewd path
#

it will only be grey parts

#

that are fine

#

alright

pulsar helm
#

yup

#

imma test

#

if it works first try am god scripter

shrewd path
#

no dont test

#

the one i did

pulsar helm
#

ik

shrewd path
#

oh you can try yours

pulsar helm
#

umm

#

it didn't work first try : (

shrewd path
#

thats alright

#

takes time to get it right

pulsar helm
#

I just instantly died on the part

#

whats suppose to happen: floor = lava, spawn parts are safe, go to grey before 15 seconds or spawn parts aren't safe

shrewd path
#

ight

cerulean estuaryBOT
#

studio** You are now Level 13! **studio

shrewd path
#

where is this in your script?

pulsar helm
#
        local function humanoidTouch2(humanoid)
            local humanoidTouchEvent2 = humanoid.Touched:Connect(function(part)
                if part == game.Workspace.SimonGround then
                    humanoid.Health = 0
                end
            end)
            for i = 15, 0, -1 do
                task.wait(1)
                for _, player in pairs(game.Players:GetPlayers()) do
                    player.PlayerGui.ScreenGui.TextLabel.Text = i
                end
            end
            local function humanoidTouch3(humanoid)
                local humanoidTouchEvent3 = humanoid.Touched:Connect(function(part)
                    if part ~= Part then
                        humanoid.Health = 0
                    else
                    end
                end)
            humanoidTouchEvent3:Disconnect()
            humanoidTouchEvent2:Disconnect()
            end
        end
    else
        for i = 5, 0, -1 do -- 5 Second For loop that counts down
            task.wait(1)
            for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
                player.PlayerGui.ScreenGui.TextLabel.Text = i -- Changes all players Text to equal the countdown time
            end
        end
    end```
shrewd path
#

i meant as in what lines

#

does it start in

pulsar helm
cerulean estuaryBOT
#

studio** You are now Level 15! **studio

pulsar helm
#

look for urself

shrewd path
#

ty

#

ah i see

#

thats a good spot

pulsar helm
#

@shrewd path can I disconnct the function outside of the function?

shrewd path
#

yup

pulsar helm
#

k

shrewd path
#

as long as its on the same scope ((scope is the level of depth or whatever idk(u can usually tell by the indents)

pulsar helm
#

that does not work

#

: (

shrewd path
#

yeah ima just try and figure this out on my own

#

so i probs wont reply too much

pulsar helm
#

ok

#

it doesn't work : (

shrewd path
#

do you have a GreyFolder?

pulsar helm
#

yes

#

I do

shrewd path
#

ok

#

i will be usin that :D

pulsar helm
#

bruh

#
        local function humanoidTouch2(humanoid)
            local humanoidTouchEvent2 = humanoid.Touched:Connect(function(part)
                if part == game.Workspace.SimonGround then
                    humanoid.Health = 0
                else
                    print(part)
                end
            end)
            for i = 15, 0, -1 do
                task.wait(1)
                for _, player in pairs(game.Players:GetPlayers()) do
                    player.PlayerGui.ScreenGui.TextLabel.Text = i
                end
            end
            humanoidTouchEvent2:Disconnect()
        end
        local function humanoidTouch3(humanoid)
            local humanoidTouchEvent3 = humanoid.Touched:Connect(function(part)
                if part == Part then
                else
                    humanoid.Health = 0
                end
            end)
            humanoidTouchEvent3:Disconnect()
        end
    else
        for i = 5, 0, -1 do -- 5 Second For loop that counts down
            task.wait(1)
            for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
                player.PlayerGui.ScreenGui.TextLabel.Text = i -- Changes all players Text to equal the countdown time
            end
        end
    end``` @shrewd path
#

its not even printing the part its just killing me : (

shrewd path
#

wassup

pulsar helm
#

am stupid

#

am stupid

#

am dumb

#

am stupid

shrewd path
#

no no no

#

your not dumb

#

we've all been confused before

pulsar helm
#
        local humanoidTouchEvent = humanoid.Touched:Connect(function(part)
            if part.Parent ~= Folder and not part.Parent:FindFirstChild("Humanoid") then
                if part.Parent:IsA("Accessory") or part.Parent:FindFirstChild("Humanoid") then
                    -- Checks if the thing touched was a player or an accessory since player's may have accessories on
                else
                    humanoid.Health = 0
                end
            end
        end)``` I forgot about this part of the script
shrewd path
#

yeah i was about to say

pulsar helm
#

me dumb

shrewd path
#

cant we just reuse it

pulsar helm
#

I just have to put it in the if statement

shrewd path
#

ok

#

im testing my script

#

ill post

#

when i see it working

pulsar helm
#

now I wil l test

#

ok

#

it kinda worked

#

do I have to run the function?

shrewd path
#

nah

#

i think its fine

pulsar helm
#

Makes a new Thread that plays the humanoidTouch() function and gives the humanoid arguement what does it mean but giving the humanoid a agruement

shrewd path
#

basically

#

an agruement

#

its just a term that is used

#

to talk about the info being transferred inside the parenthesis

#

of a function

pulsar helm
#

me:😭 realgun

shrewd path
#

humanoidTouch( argument1, argument2, ...)

#

basically something like that

pulsar helm
#

so can use just use it for the other stuff

shrewd path
#

omg i just realized

#

i messed up my script

#

😂

pulsar helm
#

o

#

afl

#

afk

shrewd path
#

alright 👌

shrewd path
#

im just tryna remember how i did all this 😂

#

its like i was actually using my brain a day ago

#

idk where it went today lol

#

ok

#

well

#

looks like my script works

#
if color == "Grey" then
    local function humanoidTouch(humanoid) -- Function that handles the humanoidTouchEvent, also receives humanoid arguement to define it
        local humanoidTouchEvent = humanoid.Touched:Connect(function(part)
            if part == game.Workspace.SimonGround then
                humanoid.Health = 0
            end
        end)
        task.wait(15) -- 15 second duration of the touchEvent
        humanoidTouchEvent:Disconnect() -- Disconnects the humanoidTouchEvent, making it no longer have an effect
    end
    
    for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
        local humanoid = player.Character and player.Character:FindFirstChild("Humanoid") -- Defines humanoid
        task.spawn(humanoidTouch, humanoid) -- Makes a new Thread that plays the humanoidTouch() function and gives the humanoid arguement
    end
    
    for i = 15, 0, -1 do -- 15 second timer until players must make it to the grey platforms
        task.wait(1)
        for _, player in pairs(game.Players:GetPlayers()) do
            player.PlayerGui.ScreenGui.TextLabel.Text = i
        end
    end
    
else
    for i = 5, 0, -1 do -- 5 Second For loop that counts down
        task.wait(1)
        for _, player in pairs(game.Players:GetPlayers()) do -- Loop that goes through all players
            player.PlayerGui.ScreenGui.TextLabel.Text = i -- Changes all players Text to equal the countdown time
        end
    end
end
#

basically what i did

#

1.) Made humanoidTouch(humanoid) last 15 seconds in which it kills all players touching the ground

2.) Made it so that all players will play the function via task.spawn(humanoidTouch, humanoid). This is so that it is multiple threads playing simultaneously (at the same time) so that the task.wait(15) doesn't affect the other players some how.

3.) Made a for loop that acts as a the visual 15 second timer

#

v

#

heres a medal clip

#

of me testing my script

#

this is the entire script

#

i got

#

hopefully this works for you @pulsar helm

shrewd path
#

in the vid

#

i show myself dying to the floor

#

during the countdown

#

i also show myself dying to the other platforms when the countdown ends and the player should be on grey

#

its 12 for me now

pulsar helm
#

hi

#

@shrewd path it works

#

perfectly

#

ty

#

but we have to spawn parts so the player can parkour to the grey part

#

and the grey part spawns randomly so how do we determine where to spawn the parts

pulsar helm
#

I got a idea

#

we can get the position of grey then go off from there

#

like Grey.Position(+5 2 +5) so it adds on to the position of grey

pulsar helm
ashen lava
#

I'm busy too okay :'(

pulsar helm
shrewd path
#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

#

i am awake still

shrewd path
#

whats what im sayin

pulsar helm
#

hi

#

where were u

shrewd path
#

uh

#

i got up

pulsar helm
#

o

shrewd path
#

got some water

#

and walked around for a bit

#

in the house

pulsar helm
#

why

shrewd path
#

idk why

#

i just

pulsar helm
#

bruh

shrewd path
#

did it

#

with a blank mind

#

then i was like

pulsar helm
#

ok...............

shrewd path
#

oh yeah

#

i gotta help axoy

#

so i went bac

pulsar helm
#

u forgot about me : (

shrewd path
#

i forget about alot of things

#

atleast I was able to remember afterwards

pulsar helm
#

yeah

shrewd path
#

so whats the problem?

pulsar helm
#

so anyways

shrewd path
#

alright

shrewd path
#

im not sure what you mean exactly by determine

#

i think you mean like

shrewd path
#

set the positon?

pulsar helm
#

huh

shrewd path
#

also

#

wassup eddy

#

you chillin?

ashen lava
#

If you want to determine where to spawn the parts

#

Set the position

pulsar helm
#

not helpful..

shrewd path
#

lol

#

it is what it is

ashen lava
#

But you said that

shrewd path
#

i think hes explaining more

#

anyway

pulsar helm
#

bruh\\\\\\\\\\

ashen lava
#

Anyways hi

shrewd path
#

Im assuming the goal is to set the position of the grey platform to be close to the others so they can jump across

pulsar helm
#

yes

#

wait no

shrewd path
#

huh

ashen lava
#

You can use for loop for it then

pulsar helm
#

the grey platform spawns in a random spot but players might not be able to reach it so we need to spawn parts so the player can reach the grey platform

ashen lava
#

Btw y'all need to talk this somewhere else like dms or smth, because I think this is breaking the rules already idrk

pulsar helm
#

o

#

wait really?

pulsar helm
#

where are the rules

ashen lava
#

I got warned once for talking something else

#

Which got me scared lol

shrewd path
#

oh

#

i mean we dont diverge too far from the topic

#

so i think we are fine

ashen lava
#

But the thing is I don't really know

pulsar helm
#

we can make a group chat

ashen lava
shrewd path
pulsar helm
#

yes

shrewd path
#

i mean

ashen lava
#

Just manipulate the Y vector

pulsar helm
#

huh

ashen lava
#

Because in the graph

#

Y is the height of the worldSpace

#

In the workspace or 3D space

pulsar helm
#

what graph bruh

#

I already know what Y is...

ashen lava
#

In school you'll learn about the Graph of 2D space, X and Y, Y represents the Height

#

But since we're using 3D

pulsar helm
#

o I already learned that

ashen lava
#

We're going to have dept and etc

#

So if you want the platform to be able to spawn in a certain height that players can jump on it

shrewd path
#

ok

#

ima just go to sleep

#

since Eddy got it in the bag

#

lol

ashen lava
#

Just manipulate the Y axis

pulsar helm
#

no

#

eddy is terrible at this

shrewd path
#

huh

ashen lava
#

I might leave :')

shrewd path
#

no eddy is good

pulsar helm
#

don't leave

shrewd path
#

nOOOOO

#

EDDDYYYY

ashen lava
#

I got shit to do okay 😭

shrewd path
#

oh alright

#

dont wanna hold you for too long

#

you get that done then

#

cya Eddy

ashen lava
#

Thanks

#

bye bye

shrewd path
#

anyway

#

axoy

pulsar helm
#

eddy gets off topic with what I need help with and makes it has confusing as possible

shrewd path
#

no, i think its just his thought process and explanation is different

#

compared to my style of teachin

pulsar helm
#

no

shrewd path
#

he's a smart guy

pulsar helm
#

maybe

shrewd path
#

vine boom

#

anywa

#

like you said earlier

pulsar helm
#

I have a idea

shrewd path
#

spawn extra platforms to make it to the grey platform

#

ye

pulsar helm
#

what if we spawn like lets say 10 parts all around the grey platform

shrewd path
#

i mean

#

that would work

pulsar helm
#

so one part is Grey.Positon but -5x

#

next part is Grey.Position but +5x

#

and so on

#

but how do I script that

shrewd path
#

hey

#

good idea

#

uhhh

#

how to script that 😅

pulsar helm
#

bruh

shrewd path
#

I would make it so that in the script

#

when the grey thing is playing

#

or whatever you wanna call it

#

You will get the grey platforms position

#

create the new instances

#

and just add the 5 studs or whatever

#

by doing

pulsar helm
#
HelpingParts.Position = game.Workspace.GreyFolder.Grey```
#

something like this

shrewd path
#

yeeee

pulsar helm
#

but we have to add 5 to the Grey part

#

which idk how to do

shrewd path
#

ok

#

so heres my idea

#

hold on

#

lemme

#

type it out

pulsar helm
#

k

shrewd path
#
local HelpingParts = Instance.new("Part")
HelpingParts.Position = Part.Position + Vector3.new(5,0,0) -- Sets the position of the helping part to the Grey part's position, plus an offset

#

that could work

#

maybe

pulsar helm
#

YES

shrewd path
#

bus

#

brainblast

pulsar helm
#

where we put in script tho @shrewd path ]

shrewd path
#

post script

#

ill point out the spot that best fits it

#

hello?

#

its gonna be 1 o'clock in a few minutes 😭

#

i need to fix my sleep schedule mannn

#

lol

#

@pulsar helm

pulsar helm
#

back

shrewd path
#

ima go get a water while you respond

pulsar helm
#

sorry

shrewd path
#

o

#

ngm

#

nvm

pulsar helm
shrewd path
#

w mans

pulsar helm
#
HelpingParts.Position = game.Workspace.GreyFolder.Grey.Position + Vector3.new(5,0,0)``` also edit to what u made
shrewd path
#

i would put it in here

#

in between the if statement and the humanoidTouch function

pulsar helm
#

ok

#

why']

#

why put it there

shrewd path
#

because we want it to spawn the helping part when the color is grey

#

and we want this to happen immediately

pulsar helm
#

o yeah

shrewd path
#

before the countdown and all it's shenanigans

#

anyway

#

if you want more helping parts, you can probably use a for loop

#

i need to sleep

#

gn man

pulsar helm
#

I will test

#

ok

#

good night

#

what "gn" mean?

#

oh it means goodnight

#

yeah goodnight to u to

#

I have a better idea

#

we create caucalte the the distance between the player and the grey part

#

then we make if statements for the distance like if distance between player and grey part is greater then 15 then

#

based on the if statement is how many helping parts we will spawn in between of the player and the grey part

#

maybe this is dumb

#

if we create a grid of helping parts around the grey part tho we have to detect if the helping part is in the walls

#

which idk how to do that

#

better idea we just spawn 20 random parts around the map

#
        for i = 1,20,1 do
            local HelpingParts = Instance.new("Part")
            HelpingParts.Position = Vector3.new((math.random(CornerA.Position.X, CornerB.Position.X)),2,(math.random(CornerA.Position.Z, CornerB.Position.Z)))
            HelpingParts.BrickColor = BrickColor.new("Cyan")
            HelpingParts.Parent = game.Workspace.HelpingPartsFolder
            HelpingParts.Anchored = true
            HelpingParts.Name = "HelpingParts"
            HelpingParts.Size = Vector3.new(9,2,9)
            local function collisionCheck()
                local PartsInPart = workspace:GetPartsInPart(HelpingParts) -- Define PartsInPart
                for key, value in pairs(PartsInPart) do -- For Loop that goes through everything in the PartInPart
                    if PartsInPart[key].Parent:IsA("Folder") then -- Checks if the otherPart touching our New Part is another Platform via folder check
                        Part.Position = Vector3.new((math.random(CornerA.Position.X, CornerB.Position.X)),2,(math.random(CornerA.Position.Z, CornerB.Position.Z)))
                        task.spawn(collisionCheck) -- Starts a new collisionCheck incase the reposition put it inside another part
                        break -- breaks the current loop so that the reposition won't happen excessively
                    end
                end
            end
            collisionCheck()
        end``` so here is what I added
#

I want the part to fade away when a player touches it tho

#

like super fast

#

dang am smart

#

I did it all

#

LOOOOk

pulsar helm
#

also should part's size me random or not random?

#
    local random3 = math.random(7,8)
    print(random3)
    if random3 == 8 then
        FloorLavaSimonSays()
    else
        chooser()
    end
    task.wait(5)
end``` I tryed to make it so this event happens randomly with the other events but it completely breaks the game and also I tryed to get rid of all the helping parts after but that doesn't work at all
#
    task.wait(5)
    chooser()
end
``` also why does my for loop ignore ```task.wait(4)``` this wait and ```task.wait(3)``` this wait
pulsar helm
#

why are the waits so confusing

#

Am going to bed its 1:22 AM I should not be scripting rn (edited at 1:22 AM)

shrewd path
#

im back

#

your script looks great!

#

And, you were able to solve it on your own

pulsar helm
#

yup !

pulsar helm
#

@shrewd path

#

why does the for loop ignore the waits tho

shrewd path
#

uhh

#

which loop are we talking about

pulsar helm
#

bruh

shrewd path
#

theres alot of loops

pulsar helm
#

look back

shrewd path
#

for i = 1,math.random(1,2),1 do -- For Loop where every 5 seconds, the chooser() function will play
task.wait(5)
chooser()
end

#

this one?

pulsar helm
#

yes\

shrewd path
#

thats a good question

#

uhhh

#

lemme find it in the script, it might help me figure out

#

ok so

#

looking at the script

#

i can say

#

the task.wait(5) probably does work

#

its just that

#

if you look at simonColor()

#

you see how

#

near the end of it

#

it's got a task.spawn to do the kill effect

#

when we do task.spawn

#

its creating a new thread so that it can play at the same time

pulsar helm
#

wait waht

shrewd path
#

which means that the task.wait(5) is also playing during that time

pulsar helm
#

no

shrewd path
#

since the simonColor() function was technically finished

#

huh

pulsar helm
#

the for loop shouldn't be running unntil the wait is over

#

also there is no task.spawn for simon color

shrewd path
#

im refering to this one

pulsar helm
#

bruh

shrewd path
#

its at the end of simonColor

pulsar helm
#

ok

#

so

shrewd path
#

if you want, you could just put another task.wait()

#

inside the simonColor()

pulsar helm
#

I alreayd did that

shrewd path
#

at the very end

#

and where is it exactly?

pulsar helm
#

but why does it ignore the task.wait at the very top

#

thats the problem

shrewd path
#

as in the 1.5 second

#

or what

pulsar helm
#

no

#

bruh

shrewd path
#

theres alot of task.waitws

pulsar helm
#

the task.wait(4)

#

omg

#

AT THE VERY TOP

shrewd path
#

oh yeah that

#

ngl i forgot that existed 🤣

pulsar helm
#

bruh

#

so why does the for loop ignore that wait

shrewd path
#

i dont think it should be ignoring that wait

#

if you could

#

try debugging it

#

with a print before and after the task.wait(4)

pulsar helm
#

k

#

wait

#

@shrewd path

shrewd path
#

wassup

pulsar helm
#
    random3 = math.random(1,10)
    if random3 == 8 then
        FloorLavaSimonSays()
    else
        chooser()
    end
end```
#

would this work

shrewd path
#

yeah

#

i dont s ee why it wouldn't

pulsar helm
#

bruh'

shrewd path
#

if i were you

pulsar helm
#

wait

#

@shrewd path

shrewd path
#

?

pulsar helm
#

as soon as I join the game it prints'

#
print("waited 4 secs")```
shrewd path
#

yknow what could be a problem

pulsar helm
#

sending video

shrewd path
#

no i believe you

#

i think why it instantly prints it

#

is because the server is already beginning to run the script, even before you manage to load in

pulsar helm
#

maybe

#

I will increase wait : )

shrewd path
#

go for it

pulsar helm
#

it works

#

bruh I can't belive that was the problem

shrewd path
#

it is what it is

shrewd path
#

ima be going afk soon

#

so its better if you ask now

pulsar helm
#

ok

shrewd path
#

so you got any?

pulsar helm
#

i think am good

#

=-0
b

#

@shrewd path are u still afk

shrewd path
#

nah

pulsar helm
#

yay I need help

#

@shrewd path look ```for i = 1,109,1 do -- For Loop where every 5 seconds, the chooser() function will play
random3 = math.random(1,10)
print(random3)
if random3 == 8 then
print("starting lavasimonsays")
FloorLavaSimonSays()
print("lavasimonsays is in action")
else
print("starting normalsimonsays")
chooser()
print("normalsimonsays is in action")
end
end

#

so I tired to debug it

#

but whenever is says 8 it runs the function but does not wait at all and instantly loops again @shrewd path

#

which is bad

shrewd path
#

post the script

pulsar helm
#

ok

shrewd path
#

ok

#
function FloorLavaSimonSays()
    local function humanoidTouch2(humanoid)
        local color = "Grey"
        local brickColor = BrickColor.new("Grey")
        for _, plr in pairs(game.Players:GetPlayers()) do
            plr.PlayerGui.ScreenGui.TextLabel.Text = "Simon says touch Grey without touching the ground"
            plr.PlayerGui.ScreenGui.TextLabel.Visible = true
        end
        simonColor(color, brickColor)
    end
    for _, player in pairs(game.Players:GetPlayers()) do
        local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
        task.spawn(humanoidTouch2, humanoid)
    end
end
#

in your FloorLavaSimonSays

#

your simonColor() is inside the humanoidTouch2 function

#

and we task.spawn'd that function

#

so its running at the same time

pulsar helm
#

wait what

shrewd path
#

instead, we want simonColor() to be outside so its not playing simotaniously

pulsar helm
#

huh

#

so no task.spawn?

shrewd path
#

huh

#

oh no we keep task.spawn

pulsar helm
#

o

shrewd path
#

we just need simonColor() to be moved

pulsar helm
#

where}?

?
?
?
?
?
?
?
?
?
?
?

shrewd path
#

just move the line lol

#

that way its not part of the humanoidTouch2 function

#

and wont be task.spawned

pulsar helm
#

oh ok

shrewd path
#

because we only oh wait

pulsar helm
#

do I move vars to?

shrewd path
#

Yes

pulsar helm
#

k

#

wait

#

why does it spawn 2 grey parts

shrewd path
#

huh

#

where did you put it

#

the simonColor()

#

take a picture

pulsar helm
#

k

shrewd path
#

oh wait

#

i know what the problem is

#

wait no i dont

pulsar helm
#
    local function humanoidTouch2(humanoid)
        local color = "Grey"
        local brickColor = BrickColor.new("Grey")
        for _, plr in pairs(game.Players:GetPlayers()) do
            plr.PlayerGui.ScreenGui.TextLabel.Text = "Simon says touch Grey without touching the ground"
            plr.PlayerGui.ScreenGui.TextLabel.Visible = true
        end
        simonColor(color, brickColor)
    end
    for _, player in pairs(game.Players:GetPlayers()) do
        local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
        task.spawn(humanoidTouch2, humanoid)
    end
    local color = "Grey"
    local brickColor = BrickColor.new("Grey")
    simonColor(color, brickColor)
end
for i = 1,109,1 do -- For Loop where every 5 seconds, the chooser() function will play
    random3 = math.random(1,10)
    print(random3)
    if random3 == 8 then
        FloorLavaSimonSays()
    else
        chooser()
    end
end
shrewd path
#

you moved it but you didnt delete the previous simonColor()

#

just get rid of that line

#

you have two of them lol

#

just get rid of the one i highlighted

pulsar helm
#

o

#

am dumb

shrewd path
#

nah

pulsar helm
#

@shrewd path

#
            task.wait(1)
            for _, player in pairs(game.Players:GetPlayers()) do
                player.PlayerGui.ScreenGui.TextLabel.Text = "Simon says touch Grey without touching the ground in"..i
            end
        end```
#

the I changed the countdown

shrewd path
#

mhm

pulsar helm
#

but am trying to add a space between "in" and the number

shrewd path
#

that is changed lol

pulsar helm
#

and it is not working

shrewd path
#

huh

#

oh

#

i see

#

in the "Simon says touch Grey without touching the ground in" text

#

just add a space in there

pulsar helm
#

its says "'Simon says touch Grey without touching the ground in12'" its suppose to say "'Simon says touch Grey without touching the ground in 12'

shrewd path
#

"Simon says touch Grey without touching the ground in "..i

pulsar helm
#

wait what

#

what i do

shrewd path
pulsar helm
#

ooooooooooooooo

shrewd path
#

yeaaa

pulsar helm
#

@shrewd path

#

are u good at building?

shrewd path
#

why do you ask?

pulsar helm
#

cuz

#

I need help with building

shrewd path
#

oh

pulsar helm
#

everything I make sucks

#

I only script

shrewd path
#

how so?

pulsar helm
#

bruh

shrewd path
#

i mean, overtime, your modeling skills get better with practice

#

but if you want

#

you can add me into the studio

#

and i ill help

pulsar helm
#

I have never even modeled before

#

I just create parts

#

and scripts

shrewd path
#

well just imagine modeling as combining and reshaping multiple parts

pulsar helm
#

what your ign name

shrewd path
#

same as discord name

pulsar helm
#

(in game name)

#

roblox name

#

oh ok

shrewd path
pulsar helm
#

one sec'

#

adding u...

#

@shrewd path

shrewd path
#

real

pulsar helm
#

u have to my roblox friend to be able to let u edit

#

it says that

shrewd path
#

ah ok

pulsar helm
#

I iwll add u

shrewd path
#

that is me

#

lol

pulsar helm
#

yeah

#

I sent it

shrewd path
#

got it

pulsar helm
#

accpet it

#

yay

#

ok u can join now

#

u don't need to script anything

#

just build a lobby for the players to spawn in

shrewd path
#

ye

#

i think this is the point where we gotta use dms

#

or else we breakin rules

pulsar helm
#

ok

#

oh