I’m currently working on a game similar to “the infinite road trip” and “bus simulator”, which are just social hangouts on vehicles that just drive with periodic pauses. I’m also using the way “the infinite road trip” makes their illusion that the car is moving. Moving textures, conveyers, death parts and ragdoll. This would make it so if you jumped off the car, you would die, ragdoll and be left behind using the conveyers going the same speed as the texture.
The problem with doing this, you can’t really have both a fast and smooth texture. It’s either fast and harsh or slow and smooth. I need it smooth and fast, but I’m trying to figure out why fast and smooth isn’t an option. And after some testing I made a video. If you do the math, the scripts show that every 0.1 second the textures should offset by 1, and the textures should move essentially the same as each other except the amount it’s moving at a time. If you watch the video you can see that it doesn’t work like that. Can someone tell me why and/or how I could fix this?
robloxapp-20231213-1945005.wmv (6.3 MB)
-- This code moves the top one.
local part = script.Parent
local function changeOffsetStudsU()
local texture = part.Texture
if not texture then
return
end
local currentOffset = texture.OffsetStudsU
texture.OffsetStudsU = currentOffset + 0.5
end
while true do
changeOffsetStudsU()
wait(0.05)
end
-- This code moves the middle one.
local part = script.Parent
local function changeOffsetStudsU()
local texture = part.Texture
if not texture then
return
end
local currentOffset = texture.OffsetStudsU
texture.OffsetStudsU = currentOffset + 0.25
end
while true do
changeOffsetStudsU()
wait(0.025)
end
-- This code moves the bottom one.
local part = script.Parent
local function changeOffsetStudsU()
local texture = part.Texture
if not texture then
return
end
local currentOffset = texture.OffsetStudsU
texture.OffsetStudsU = currentOffset + 0.1
end
while true do
changeOffsetStudsU()
wait(0.01)
end