✓ Accepted answer
So first of all you need to create a GUI in the starter pack. Name that GUI "ScreenEffect" and inside it incert a frame. Name that frame "Black" and size it about... {0,1000,0,1000} and make it's colour "Really black".
Great! Now we have our effect created. Now we just want to make it work.
Lets make an on touch effect
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild('Humanoid')then
hit.Parent.Torso.CFrame = CFrame.new(-502, -16.5, 153)
end
end)
Now we'll create a function that will make that effect fade!
script.Parent.Touched:connect(function(hit)
game.Players:WaitForChild(playername).PlayerGui.ScreenEffect.Black.Visible = true
for i = 1 ,10 do
local playername = hit.Parent.Name
game.Players:WaitForChild(playername).PlayerGui.ScreenEffect.Black.BackgroundTransparency = game.Players:WaitForChild(playername).PlayerGui.ScreenEffect.Black.BackgroundTransparency + 0.100
wait(.5)
end
if hit.Parent:findFirstChild('Humanoid')then
hit.Parent.Torso.CFrame = CFrame.new(-502, -16.5, 153)
end
end)
wait(5)
for i = 1 ,10 do
local playername = hit.Parent.Name
game.Players:WaitForChild(playername).PlayerGui.ScreenEffect.Black.BackgroundTransparency = game.Players:WaitForChild(playername).PlayerGui.ScreenEffect.Black.BackgroundTransparency - 0.100
wait(.5)
end
wait(3)
game.Players:WaitForChild(playername).PlayerGui.ScreenEffect.Black.Visible = false
Note: The "Black" frame transparency must be on 0 when editing. Don't worry, must be invisible to fade, obviously.
I didn't test this on studio so if there's any error comment and I'll try to fix it.
5 comments
Don't make the size {0, 10000} {0, 10000}, just make it {1, 0} {1, 0} for convenience.
That works too. But I always use 1000.
Hello wilsonsilva007, thank you very much for your answer. I have tried what you've told me to above, and tested it out, but it doesn't do anything. FilteringEnabled is not on, made sure of that first. When I view the Output when I walk into the teleporter, it says 'Argument 1 missing or nil' Do you have any ideas why?
I will test it in studio and I'll fix everything that's wrong as soon as I can. Don't worry.
Okay, thank you. Sorry for the late reply