I don't know pretty much coding so I need some help. And is this correct?
player = game.Players.Player target = Vector3.new(20, 10, 20) function fadeTo(a, b, c) for transparency = a, b, c do for _, part in pairs(player.Character:GetChildren()) do if part:IsA("BasePart") then part.Transparency = transparency end end wait(0.1) end end fadeTo(0, 1, 0.1) player.Character.Torso.CFrame = target fadeTo(1, 0, -0.1)
Instead of doing target = Vector3.new(20, 10, 20)
, do
target = CFrame.new(20, 10, 20)
.
This is because when you assign the Torso.CFrame property, it requires a CFrame value
, and not a Vector3
value.
I hope this helps! :)