so, i was trying to do this:
print("shop")
local startpos = Vector3.new(-181.084, -36.875, -3.198)
local destinationpos = Vector3.new(0.239, -36.875, -3.198)
local endpos = Vector3.new(185.349, -36.875, -3.198)
local truck = game.ServerStorage.Truck:Clone()
truck.Parent = workspace
truck:MoveTo(startpos)
wait(.5)
workspace.SFX.ShopHorn:Play()
wait(1)
workspace.SFX.ShopCrash:Play()
game.TweenService:Create(truck.PrimaryPart, TweenInfo.new(1.5, Enum.EasingStyle.Elastic), {Position = destinationpos}):Play()
wait(1.5)
truck:MoveTo(destinationpos)
local trigger = false
truck:FindFirstChild("guy").Head.ProximityPrompt.Triggered:Connect(function()
trigger = true
end)
repeat wait() until trigger
workspace.SFX.ShopHorn:Play()
wait(1)
game.TweenService:Create(truck.PrimaryPart, TweenInfo.new(3, Enum.EasingStyle.Sine), {Position = endpos}):Play()
wait(3)
truck:MoveTo(endpos)
truck:Destroy()
i was trying to make it so the truck goes the destination from the start pos, then after player confirms/trigger prompt the truck goes to the endpos and disappears. But the prompt didnt work, i suppose this was the problem:
[CLIENT SIDE ↑]
[SEVER SIDE ↑]
i welded it too:
so, how do i fix this?