So, I'm making a game where, after a random number of seconds, a block dissapears, in the air, with the player on it. I need the player to fall, but it floats in the air, meaning that the part just turns transparent, it doesn't disappear. Here is my current code:
Part=script.Parent -- the part while wait (math.random (1,3) ) do -- repeat this loop every (random) seconds Part.Transparency=1 wait(math.random(1,5)) -- wait between 1 to 5 seconds Part.Transparency=0 end
I need the player to fall. Can you help me? Thanks!
You need to change the CanCollide property of the part along with the transparency. This property decides whether or not a player can collide with a part. Here is the previous answer taking that into account;
Part=script.Parent -- the part while wait(14) do -- repeat this loop every 14 seconds Part.Transparency=1 Part.CanCollide=false wait(math.random(6,12)) -- wait between 6 to 12 seconds Part.Transparency=0 Part.CanCollide=true end