How do i make floors invisible using a local script?

I want to make a code so if the player enters the first floor the second and third floor disappears
and if the player is on the staircase the second floor reappears etc.

1 Like

Doing this with a localscripts works exactly the same way as doing it with a serverscript. The only difference is that other players cant see the change if the localscript makes the change.

Basically

Local = Visible to your side only
Server = Visible to everyone’s side

You could potentially do this via checking Region3 inside a loop, (Or with a Touched event for certain parameters), it entirely depends on your personal preference

Do you want it to be invisible? Or do you want it to be gone from the game.
if you want it to be gone from the game then you can do this

local floorone = game.Workspace --get the floor
local remParent = floorone.Parent			
floorone.Parent	= nil

wait(0.4)		

debounce = false		
wait(10) 
floorone.Parent = remParent	

wait(1)

local floortwo = game.Workspace. --get the floor  
local remParent = floortwo.Parent			
floortwo.Parent = nil
wait(0.4)		
debounce = false		

wait(1) 

floortwo.Parent = remParent	

Now repeat this script