Hello, my fellow scripters and game developers, I am making a game of ziplining, but when I use it, my character rapidly spins and lags, though it still moves the player? what can I do to fix this, i would love some help, thank you, here is the code.

local TweenService = game:GetService("TweenService")

function onTouched(Obj)
	local h = Obj.Parent:FindFirstChild("HumanoidRootPart")
	if h then
		local playertween = TweenService:Create(
			h,
			TweenInfo.new(2, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut, 0.5, false, 0),
			{CFrame = script.Parent.Parent.wha.CFrame}
		)
		playertween:Play()
	end
end

script.Parent.Touched:Connect(onTouched)

3 comments

0

I dont get it.. you're tweening the actual player.. is'nt he meant to be like attached to a part on a zipline?

0

You Would Want To Use BodyPosition On The Character. Not TweenService.

0

how do i do that?