I want to use a bus model to have a person ride and repeat a specific point.
Cannot move to cframe because there is no “PrimaryPart” in the model.
treen too…
If you try to do it by driving a car,
The model is fine, but there is an unknown collision area that occurs when I load it into Roblox, so I am dealing with the collision with a basic part block. (Anchor)
If this is the case, is there a way to periodically move the relevant bus model?
※ This is Google Translate.
The code below uses tweens.
Other mesh parts work fine, but not on the bus model.
local FindTimeSec = 5
--:::::::::::::::::::::::::::::::::::::::::::::::::::
local part = script.Parent--:WaitForChild("Bus")
local Point_End = script.Parent.Parent:WaitForChild("Point_End")
--:::::::::::::::::::::::::::::::::::::::::::::::::::
local TweenService = game:GetService("TweenService")
local Panel = part -- workspace.Truck
local PanelRoot = Panel.PrimaryPart
wait(2)
local PanelSlideInfo = TweenInfo.new(5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0) -- Let's use all defaults here
local PanelSlideTween = TweenService:Create(PanelRoot,
PanelSlideInfo, {
CFrame = CFrame.new( Point_End.CFrame.p )
})
--:::::::::::::::::::::::::::::::::::::::::::::::::::
local function DoorSet( WaveLevel )
local Bus = script.Parent.Parent
if WaveLevel == 1 then
PanelSlideTween:Play()
else
end
end
game:GetService("ReplicatedStorage"):WaitForChild("Wave_Value").Changed:Connect( DoorSet )