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)```
#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)
Wait so is the floor supposed to kill you still?
somewhere here
the floor kills u but u have to get to grey in 20 seconds without touchign the floor or u will die
thats the goal : )
ight ima replicate the game
for testing
So your saying
wait
where is the gray event even?
????
like yknow how you said you want there to be a simon says, touch grey without touching the floor?
yes
wheres that at
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?
bruh
ok
because after a random amount of times the normal colors run the HARD COLROS RUN
also
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```
thank you
your welcome : )
so @shrewd path this will check if the color is grey if so it will make it so that when u touch the ground u die and after 15 seconds u will be able to touch the ground again but what am gonna try to do now is make it so also after 15 seconds everyone who is not touching grey will die if color not grey then continue normal color pattern
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
huh
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
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
```
this should work
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
@shrewd path the players are going to have to parkour onto other parts to get to grey(like floor is lava)
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
yup
ik
oh you can try yours
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
ight
** You are now Level 13! **
where is this in your script?
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```
** You are now Level 15! **
look for urself
@shrewd path can I disconnct the function outside of the function?
yup
k
as long as its on the same scope ((scope is the level of depth or whatever idk(u can usually tell by the indents)
do you have a GreyFolder?
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 : (
wassup
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
yeah i was about to say
me dumb
cant we just reuse it
I just have to put it in the if statement
Makes a new Thread that plays the humanoidTouch() function and gives the humanoid arguement what does it mean but giving the humanoid a agruement
basically
an agruement
its just a term that is used
to talk about the info being transferred inside the parenthesis
of a function
me:😭 
so can use just use it for the other stuff
alright 👌
yeah my bad you did need to call it
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
Watch Testing#2 and millions of other Roblox Studio videos on Medal, the largest Game Clip Platform.
heres a medal clip
of me testing my script
this is the entire script
i got
hopefully this works for you @pulsar helm
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
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
its 10 for me
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
I forgot how to do that tho so @shrewd path can u help me?
I'm busy too okay :'(
unforgiveable😭
whats what im sayin
o
why
bruh
ok...............
u forgot about me : (
yeah
so whats the problem?
so anyways
.
alright
Set position
set the positon?
huh
not helpful..
But you said that
bruh\\\\\\\\\\
Im assuming the goal is to set the position of the grey platform to be close to the others so they can jump across
huh
You can use for loop for it then
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
Btw y'all need to talk this somewhere else like dms or smth, because I think this is breaking the rules already idrk
oh shoot really
where are the rules
But the thing is I don't really know
we can make a group chat
Because yeah
Oh ok so make extra parts for the player to parkour to the platform
yes
i mean
Then for that
Just manipulate the Y vector
huh
Because in the graph
Y is the height of the worldSpace
In the workspace or 3D space
In school you'll learn about the Graph of 2D space, X and Y, Y represents the Height
But since we're using 3D
o I already learned that
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
Just manipulate the Y axis
huh
I might leave :')
no eddy is good
don't leave
I got shit to do okay 😭
eddy gets off topic with what I need help with and makes it has confusing as possible
no, i think its just his thought process and explanation is different
compared to my style of teachin
no
he's a smart guy
maybe
I have a idea
what if we spawn like lets say 10 parts all around the grey platform
so one part is Grey.Positon but -5x
next part is Grey.Position but +5x
and so on
but how do I script that
bruh
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
yeeee
k
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
YES
where we put in script tho @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
back
ima go get a water while you respond
sorry
w mans
HelpingParts.Position = game.Workspace.GreyFolder.Grey.Position + Vector3.new(5,0,0)``` also edit to what u made
because we want it to spawn the helping part when the color is grey
and we want this to happen immediately
o yeah
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
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
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
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)
yup !
bruh
theres alot of loops
look back
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?
yes\
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
wait waht
which means that the task.wait(5) is also playing during that time
no
the for loop shouldn't be running unntil the wait is over
also there is no task.spawn for simon color
bruh
its at the end of simonColor
I alreayd did that
theres alot of task.waitws
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)
wassup
random3 = math.random(1,10)
if random3 == 8 then
FloorLavaSimonSays()
else
chooser()
end
end```
would this work
bruh'
if i were you
?
yknow what could be a problem
sending video
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
go for it
it is what it is
you got any more questions
ima be going afk soon
so its better if you ask now
ok
so you got any?
nah
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
post the script
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
wait what
instead, we want simonColor() to be outside so its not playing simotaniously
o
we just need simonColor() to be moved
where}?
?
?
?
?
?
?
?
?
?
?
?
just move the line lol
that way its not part of the humanoidTouch2 function
and wont be task.spawned
oh ok
because we only oh wait
do I move vars to?
Yes
k
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
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
nah
@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
mhm
but am trying to add a space between "in" and the number
that is changed lol
and it is not working
huh
oh
i see
in the "Simon says touch Grey without touching the ground in" text
just add a space in there
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'
"Simon says touch Grey without touching the ground in "..i
the change i made was adding a space in the string
ooooooooooooooo
yeaaa
why do you ask?
oh
how so?
bruh
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
well just imagine modeling as combining and reshaping multiple parts
what your ign name
same as discord name
real
ah ok
got it