Hello, I’m currently trying to use the tween service to change the positioning of the player when it touches a block. However, whenever the player touches the part it doesn’t move the player despite there being no errors. Here’s the code;
d = false
local TweenService = game:GetService("TweenService")
script.Parent.Touched:Connect(function(Touch)
if Touch.Parent:FindFirstChild("Humanoid") then
if d == false then
d = true
TweenService:Create(Touch.Parent:FindFirstChild("HumanoidRootPart"),TweenInfo.new(.3,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out),{CFrame = Touch.Parent:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(0,0,-10)})
print("yes")
wait(1)
d =false
end
end
end)
Here’s what it does;
Please help, This is very confusing