Hello everyone, so working on my game, I’ve come across another issue:
How do I tween a player rig without it glitching out?
The tween was written correctly, with no errors in the script, but moving the player up is causing the player in the workspace to glitch out weirdly. I’ve tweened the CFrame of the player too, and I don’t think :MoveTo()
is going to help me either since it only teleports the player directly.
The only parameter I want from a solution is a player rig being tweened to “Float” up without glitching out. Here’s the copy of my script:
local TS = game:GetService("TweenService")
local TweenInformation = TweenInfo.new(5,Enum.EasingStyle.Exponential,Enum.EasingDirection.In,0,false,0.1)
local TweenInformation2 = TweenInfo.new(2,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0)
local Goal = {CFrame = script.Parent.Parent.GoalPart.CFrame}
local Goal2 = {CFrame = script.Parent.Parent.GoalPart2.CFrame}
------------------------------------------------------------------------------------------------------------|
function Float(part)
local VIPBoi = part.Parent:FindFirstChild("Humanoid")
if VIPBoi then
local Bro = VIPBoi.Parent.PrimaryPart
local FloatAnimation = TS:Create(Bro,TweenInformation,Goal)
FloatAnimation:Play()
FloatAnimation.Completed:Connect(function(playbackState)
if playbackState == Enum.PlaybackState.Completed then
local Glide = TS:Create(Bro,TweenInformation2,Goal2)
Glide:Play()
end
end)
end
end
script.Parent.Touched:Connect(Float)
This is a server script too, in the workspace.