You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
To make it not do that in the video hence stable
What is the issue? Include screenshots / videos if possible!
This
as you can see it tries to noclip my character
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I havent found any
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local part = script.Parent
local tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1,true)
local tween = TweenService:Create(part, tweeninfo, {
CFrame = part.CFrame * CFrame.new(0,100 ,0)
})
tween:Play()
--On the script we go!
local lastPosition = part.Position
RunService.Stepped:Connect(function(_, deltaTime)
local currentPosition = part.Position
local deltaPosition = currentPosition - lastPosition
local velocity = deltaPosition / deltaTime
part.AssemblyLinearVelocity = velocity
lastPosition = currentPosition
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
Try pushing the script into a local script (make sure the local script is on the client side) and reference the part from there.
See if it is smoother. Also, if everybody has the local script, it won’t be only just for you. It should run for everybody. If you’re worried about sync issues, just use a value or remote events to handle syncing it.
Also, just avoid running tweens on the server, it can get pretty performance costly when the amount of moving parts increases
ohhhh yeah that happens the reason why im using tween is because i want to change the speed
well i used a different method it worked but the more i up the speed the more it moves higher and higher the way up and i hate that
Just referencing the fact that there are some who accidently or purposely put a local script into server script service.
I don’t entirely understand but as long as the tween and script was properly made, glancing it I think its fine but 11:00 me would probably miss something.
Tweens should be done on the client in order to ensure that it is smooth for the player. I don’t think there is a real case for using tweens on the server side but correct me If I’m wrong of course.
Did you try setting the network owner?
use the function :SetNetworkOwner().
if you might have many players on it, try putting nil inside the (). so it will be :SetNetworkOwner(nil).
If you know that you will have only one player on the platform, you can get the player by the Touched event, and then doing:
:SetNetworkOwner(player). Please note that the player has to be the actual player, and not their character.
The part is anchored, so network ownership doesn’t matter.
Besides, unanchored parts’ management is already handled by the engine. The engine automatically hands ownership of an unanchored part to whoever is closest, or the server if nobody is close enough.