#How to make a NPC car going in a straight line and then respawn to do it again

1 messages · Page 1 of 1 (latest)

turbid owl
#

i've been trying to fing a good ready script for that because im kinda new in making roblox games and the only one i found doesnt go in a straight line and does some weird stuff, i want the car to be unmovable by players, just go one side, despawn and respawn again

lament idol
#

npc car?

#

does it have hum or something

#

or it's just a car

hexed stream
turbid owl
lament idol
#

then yep use ts

#

Just Clone ur car where you want it to be and use while true do for loop or something like this

turbid owl
#

okay

#

im gonna check if it works in like half an hour

turbid owl
hexed stream
#
...
local tween = ... --Create your tween here

tween:Play()
tween.Completed:Wait() --It will wait for the tween to finish

car:Destroy() --Then destroy the car
turbid owl
#

oki thx

woven spadeBOT
#

studio** You are now Level 1! **studio

hexed stream
#

you can make the tween repeat itself infinitely which means you dont even need to destroy the car

lament idol
#

i meant it like

#

While True do

local Car = rs.Car
car.Parent = game.workspace
car.Cframe = part.CFrame

Local Tween = TS:Create(Car,TweenInfo.new(1),{CFrame = car.CFrame * CFrame.New(0,0,-10)}):Play()

task.Wait(5)
Car:destroy()
end

turbid owl
hexed stream
#

In a server script

turbid owl
#

oh okay

#

so not to the previous script

hexed stream
#

idk about any previous script

turbid owl
#

i used looping tween