Teleport Fading Screen Bugged

Check that this property of the teleport part is enabled.
image

1 Like

Can you like paste ur code here rather than screenshotting it so I can have a test myself?

1 Like

‘’'local player = game:GetService(“Players”).LocalPlayer
local part = workspace.Teleport1

part.Touched:Connect(function(hit)
if hit.Parent ==player.Character then
script.Parent.FadeFrame.Visible = true
for i = 1,20 do
script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency -0.1
wait()
end
player.Character.HumanoidRootPart.CFrame = workspace.Teleport1Location.CFrame *CFrame.new(0,15,0)
for i = 1,20 do
script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency +0.1
wait()
end
end
end)

‘’'local player = game:GetService(“Players”).LocalPlayer
local part = workspace.Teleport1

part.Touched:Connect(function(hit)
if hit.Parent ==player.Character then
script.Parent.FadeFrame.Visible = true
for i = 1,20 do
script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency -0.1
wait()
end
player.Character.HumanoidRootPart.CFrame = workspace.Teleport1Location.CFrame *CFrame.new(0,15,0)
for i = 1,20 do
script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency +0.1
wait()
end
end
end)’’’

local player = game:GetService(“Players”).LocalPlayer
local part = workspace.Teleport1

part.Touched:Connect(function(hit)
if hit.Parent ==player.Character then
script.Parent.FadeFrame.Visible = true
for i = 1,20 do
script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency -0.1
wait()
end
player.Character.HumanoidRootPart.CFrame = workspace.Teleport1Location.CFrame *CFrame.new(0,15,0)
for i = 1,20 do
script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency +0.1
wait()
end
end
end)
1 Like

You can click the </> symbol to make your code look more clear.

@develofied


Will this be the result?

1 Like

Hm. I also got the same result.

Yes, I just don’t understand why on develofied it’s not working.

Mine just brings the gui up but does not take it off or teleport me

Yes, but the gui needs to stay on the screen for like 5 seconds

Then you can just make a wait function in between for 5 seconds.

But the gui still stays on the screen and won’t get off, and it does not teleport me

Maybe something to do with loading the character or something. You can create a new character variable like this (put it outside the function!):

local character = player.Character or player.CharacterAdded:Wait()

Then just replace “player.Character” in the if-statement with just “character”.

That’s what I got (5-second wait function included):

local player = game:GetService("Players").LocalPlayer
local part = workspace.Teleport1

local character = player.Character or player.CharacterAdded:Wait()

part.Touched:Connect(function(hit)
	if hit.Parent == character then
		script.Parent.FadeFrame.Visible = true
		for i = 1,20 do
			script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency -0.1
			wait()
		end
		character.HumanoidRootPart.CFrame = workspace.Teleport1Location.CFrame *CFrame.new(0,15,0)
		
		wait(5)
		
		for i = 1,20 do
			script.Parent.FadeFrame.BackgroundTransparency = script.Parent.FadeFrame.BackgroundTransparency +0.1
			wait()
		end
	end
end)

This still does not work. I will record a video for you guys.

robloxapp-20230306-1916003.wmv (2.0 MB)

Why is your screen like turning instantly black or something rather than fading?

That is the gui that pops up. But the issue is, it’s not going invisible after 5 seconds and it does not teleport me

I don’t think I have anymore suggestion. Last thing that came to my mind is to just restart Studio.

Also I doubt that there isn’t any errors. Did you check Output widget or something?