Proximity prompt to transpercy=0, collisions =on

I want to add a proxity prompt to set:

  1. Transpercy to 0 then wait 0.5 and set transpercy 1
    2.when transpercy =0 then collisions =on
    And when transpercy =1 then collisions =off

Actually i want to make a portal which appers when the user interact with the proximity prompt

Any correction plz tell

1 Like

Just do a while loop to loop through the things u mentioned

local prompt = script.Parent 
local portal = game.Workspace.PORTALNAMEHERE 

script.Parent.Triggered:Connect(function() 
	portal.Transparency = 0 
	wait(0.5) 
	portal.Transparency = 1 
	portal.CanCollide = false 
end)

script.Parent.Triggered:Connect(function() 
wait(30) 
portal.Transparency = 0 
portal.CanCollide = true  
-- delete this part if you dont want it to come back on.

replace PORTALNAMEHERE with the portal part name.

1 Like

Tiny correction

local prompt = script.Parent
local portal = game.Workspace.PORTALNAMEHERE

script.Parent.Triggered:Connect(function()
portal.Transparency = 0
portal.CanCollide = true
wait(0.5)
portal.Transparency = 1
portal.CanCollide = false
end)

How do you make part of your reply script like, im new to forum

The cancollide would already be on i think? but i guess its an idea.

Also, press the
hrhhrr
button to make it in script form.

Thank you!

It will be on at first, but after triggering it will set to false and never be on again, so it will be a one time portal

Thanks (@UItraEX, @Denz_Noviembre, @lht2007) for so many replies will check each replies one by one :relaxed::relaxed::relaxed:

2 Likes

Thanks! Mark me as solution if it worked also.

Surely but let me try first then i would if it worked out

1 Like

Hey @Denz_Noviembre i marked @UItraEX as solution but even your corrections helped me.So Thank you Too For Helping Me.

2 Likes