local module = {}
function module.tweenpartpos (part,newx,newy,newz,partspeed)
local newpos = Vector3.new(newx,newy,newz)
local interval = .01
local currentx = part.Position.X
local currenty = part.Position.Y
local currentz = part.Position.Z
local intervalforx = newx - currentx
for i = 1,intervalforx/.001,1 do
part.Postion = part.Position + Vector3.new(.01,0,0)
end
end
return module
What i am after is making the part tween, on line 12 i am having an error the for i = 1,intervalforx,1 loop is for the x position of the part, how do i fix?

2 comments
Error?
14:38:32.653 - Script 'Workspace.Serverstartscripts.ModuleScript', Line 12 - field tweenpartpos