Here is my teleport script this is in workspace inside a proximity prompt,
:
script.Parent.Triggered:Connect(function(plr)
plr.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.Parttp.Position)
end)
How would i go about making it fade to black, i have a black frame made in the starter gui
2 Likes
CZXPEK
(czo)
#2
Make a RemoteEvent in ReplicatedStorage Named FadeBlack
Server Script:
script.Parent.Triggered:Connect(function(plr)
plr.Character.HumanoidRootPart.CFrame = CFrame.new(workspace.Parttp.Position)
game.ReplicatedStorage.FadeBlack:FireClient(plr)
end)
LocalScript inside the Black Frame:
game.ReplicatedStorage.FadeBlack.OnClientEvent:Connect(function()
game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.5), {BackgroundTransparency = 0}):Play()
end)
3 Likes
and the fade back to normal?
would it be possible?
CZXPEK
(czo)
#4
Just change
To:
BackgroundTransparency = 1
that just completely removed the black screen
CZXPEK
(czo)
#6
Replace the LocalScript i sent you with this:
game.ReplicatedStorage.FadeBlack.OnClientEvent:Connect(function()
if script.Parent.BackgroundTransparency == 1 then
game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.5), {BackgroundTransparency = 0}):Play()
else
game:GetService("TweenService"):Create(script.Parent, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
end
end)
Hey, it still isn’t working?
I added a delay to the teleport so that the black screen comes up before you teleport aswell