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

TweenService is moving part to wrong position, and isnt smooth?

Asked by 5 years ago

I made a script in a modulescript that moves a part. I used tweenservice to move it. But it moves the part instantly, and the vector is not correct, it should go up, not down.

script that calls it:

local yes = require(game.ReplicatedStorage.ModuleScript)

yes.moveapart(game.Workspace.Part,Vector3.new(0,5,0),1)

model script:

local module = {}

function module.moveapart(part,vector,duration)
local twen = game:GetService("TweenService")

local tweeninfo = TweenInfo.new(duration,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
local e = {Position = vector;}
local d = twen:Create(part,tweeninfo,e)
d:Play()
end

return module

ty sir

0
um that moves the part's position to the point 0,5,0 not up 5 studs on the y axis theking48989987 2147 — 5y
0
if it is a server script requiring the module then it will not be smooth because the tween is done on the server, not the client. the8bitdude11 358 — 5y
0
what do u mean by that? should i then call the function by a localscript? ieatandisbaconhair 77 — 5y
0
a smooth tween is (usually) done on the client. It not being smooth has to do with lag. I don't think the server likes to send each CFrame at once! And yes, try using a localscript and ask me if it changes anything the8bitdude11 358 — 5y
0
idk if i was right about the non-smooth tween theory the8bitdude11 358 — 5y

Answer this question