So, my goal is to have a portal spawn for 10 seconds, then disappear for 30 seconds so the player only has that 10 second window to touch it to get to the next area. (I know the timing in the script is off, it’s so I could easily test it.) but for some reason it’s not doing what’s needed. Is it the wait at the beginning? Thank you!
The script is as follows:
local part = script.Parent
local TS = game:GetService(“TweenService”)
local TweenInformation
wait(1)
TweenInformation = TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In)
local goal = {}
goal.Transparency = 1
local tween1 = TS:Create(part, TweenInformation, goal)
tween1:Play()
part.CanCollide = false
wait(5)
TweenInformation = TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local goal = {}
goal.Transparency = 0
local tween2 = TS:Create(part, TweenInformation, goal)
tween2:Play()
part.CanCollide = true
end