Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Part tweening is teleporting instead to moving to next possition?

Asked by 6 years ago
Edited 6 years ago

FirstFirePosition1, 2, 3 and 4 are inside a model named FirstFirePositions. ubicated in a square, 1 is in top right corner, 2 in top left, 3 in bottom right, and 4 in bottom left.

problem: the object i need to tween tends to teleport from different positions insted of tweening to them for example, goes from 2 to 4, and then instead of going from 4 to 3, teleports to 2 and goes to 4 from there

script:

local TweenService = game:GetService("TweenService")

    local Info = TweenInfo.new(0.1)
    local goal = {}
    goal.CFrame = script.Parent.FirstFirePositions.FirstFirePosition1.CFrame

    local Tween = TweenService:Create(script.Parent.FireSpirit.Head,Info,goal)
    Tween:Play()

while true do
    local Info = TweenInfo.new(50)
    local goal = {}
    goal.CFrame = script.Parent.FirstFirePositions.FirstFirePosition2.CFrame

    local Tween = TweenService:Create(script.Parent.FireSpirit.Head,Info,goal)
    Tween:Play()

    wait(50)

    local Info = TweenInfo.new(50)
    local goal = {}
    goal.CFrame = script.Parent.FirstFirePositions.FirstFirePosition4.CFrame

    local Tween = TweenService:Create(script.Parent.FireSpirit.Head,Info,goal)
    Tween:Play()

    wait(50)

    local Info = TweenInfo.new(50)
    local goal = {}
    goal.CFrame = script.Parent.FirstFirePositions.FirstFirePosition3.CFrame

    local Tween = TweenService:Create(script.Parent.FireSpirit.Head,Info,goal)
    Tween:Play()

    wait(50)

    local Info = TweenInfo.new(50)
    local goal = {}
    goal.CFrame = script.Parent.FirstFirePositions.FirstFirePosition3.CFrame

    local Tween = TweenService:Create(script.Parent.FireSpirit.Head,Info,goal)
    Tween:Play()

    wait(50)

end
0
Are you using a local script? if so, you need to have a renderstepped function. The reason for this is because RenderStepped runs 1/60 of a second ( 60 Fps), when you dont use renderstepped, it's like blinking your eyes every second where Renderstepped is like keeping your eyes open 4PlayerGamingRoblox 38 — 6y
0
so instead of using while true do, use Renderstepped, Renderstepped runs every 60 fps while true do runs 30fps  4PlayerGamingRoblox 38 — 6y

Answer this question