Hello, so i was trying to script a conveyer belt which basically would work like this:
There would be players on it and obstacles would spawn coming towards them. My issue is that there were jittering effect. I tried using Roblox physics for moving the obstacles and players but i could push the obstacle as the obstacle was unanchored. What would be the solution for this? I saw a lot of game using this minigame and i would really want to find the solution. Even ai couldn't help me and i was there 3 hours trying to debug with ai.
#Conveyor Belt bug help needed
1 messages · Page 1 of 1 (latest)
script is 100% needed
No its not needed, send assembly linear velocity to like 0,0-10
My assembly linear velocity is -8.5,0,0 so not a big difference
script is needed
show it to me
please
Sorry for the bad quality
I am in a different game and basically i use the same tweenservice for my conveyor
local TweenService = game:GetService("TweenService")
local part = script.Parent
local info = TweenInfo.new(
17,
Enum.EasingStyle.Linear
)
local tween = TweenService:Create(
part,
info,
{ CFrame = part.CFrame * CFrame.new(0, 0, 125) }
)
tween:Play()```
When i rely on physics only, which make me unanchor the part, i can move it but the jitter "lag" effect is gone
So i should either
1: Find a way to make unanchored parts not moveable at all which i don't think is possible as Roblox doesn't allow that.
2: Use tweenService, RunService, or any position tweening service is recommended but get rid of the jitter effect.
@bitter wagon
@half sorrel
@tawdry field
isn't it better to just really apply a physical force on everybody that's on the conveyor?
I already apply physical force. The assembly linear velocity which is 0, 0, 10 already applies this to players
so why are you tweening aswell?
oh i see
well
just create a table of the parts that are touching the conveyor
and apply the physical linear velocity to all of them
if you want them to go in different directions
just detect if its a humanoid / part
and then apply the velocity accordingly
no need for tweenservice
oh okay, but still players won't be able to move the objects right?
that would be a problem, why wont you just keep the parts anchored and the players moving?
how would physical force apply to parts then? You can move anchored parts only with tweening or positioning it via script
that's right, so you want both the player and the parts moving?
Yep
It's basically a conveyor minigame. Parts are moving and players while being on the conveyor and the parts are supposed to push you
you can keep the parts unanchored and basically make them apply bodyforce / linear relative to the human lookvector so he gets pushed back abit
** You are now Level 4! **
alright thanks i will try it and let you know