Workspace.Dummy.Script:30: Expected ')' (to close '(' at column 126),
this is my script
function lerp(a, b, c)
return a + (b - a) * c
end
function quadBezier(t, p0, p1, p2)
local l1 = lerp(p0, p1, t)
local l2 = lerp(p1, p2, t)
local quad = lerp(l1, l2, t)
return quad
end
while true do
local part = script.Parent.Parent.RightHand:Clone()
part.CanCollide = false
part.Anchored = true
part.Parent = workspace
print("BEZIERING")
for i = 1, 10 do
local t = i/10
local p0 = script.Parent.HumanoidRootPart
local p1 = script.Parent.HumanoidRootPart.Position + Vector3.new(math.random(-2.5,2.5),math.random(-2.5,2.5),0)
local p2 = script.Parent.HumanoidRootPart.Position + Vector3.new(0,0,-6)
local Pos = quadBezier(t, p0.Position, p1, p2)
local Direction = quadBezier(t + 0.005, p0.Position, p1, p2)
local tweendelay = wait()
part.CFrame = CFrame.new(Pos, Direction)
this line game.TweenService:Create(part,TweenInfo.new(tweendelay),{CFrame = CFrame.new(Pos, Direction) + CFrame.Angles((90,0,0))}):Play()
wait()
end
end