Looking for scripter to convert CFrame loop to TweenPosition

Basically right now I have a script that is:

while true do
wait()
for i = 1,100 do
	script.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.PrimaryPart.position + Vector3.new(0,script.Parent.Speed.Value,0)))
wait()
end
end

I am looking for somebody to convert that into a TweenPosition (to reduce lag) that accelerates as you go up. DM me for more details.

Payment: Will be discussed in DMs. It’s a pretty short script so don’t ask for something ridiculous like 1,000 Robux.

Discord: lolheads#5854

Is script.Parent.speed.Value static? Or you would get inconsistent results with tweening

1 Like

No, the value goes up slowly each second.

Do you have any other solutions then, or should I just stick with what I got right now?

2 Likes

I re-read your post, and since It’s a while true loop, then yes, its entirely possible. Speed will be somewhat different so just mess around with the tween time . I’ll post the code here for free :smiley:

2 Likes
local duration = 0.05; --Time it takes to tween, set it lower if you want the speed to increase.
local part = script.Parent.PrimaryPart; -- The part to apply the tween on
local tween = game:GetService("TweenService"):Create(part, TweenInfo.new(duration), {Position = part.Position + Vector3.new(0,script.Parent.Speed.Value,0)}):Play()

Do tell me if theres any errors, especially with the brackets.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.