i asked this before but i got no answer or comment and not the previous question is on the second page so i though i'd put it here again hoping to get an answer or comment
this is a server script
game.ReplicatedStorage.spawnjeep.OnServerEvent:Connect(function(player) if player.leaderstats.Money.Value >= 5000 then player.leaderstats.Money.Value = player.leaderstats.Money.Value - 5000 if game.Workspace:FindFirstChild(player.Name.."Jeep") then game.Workspac:FindFirstChild(player.Name.."Jeep"):Destroy() game.ServerStorage.Configuration.Jeep:Clone().Parent = game.Workspace game.Workspace.Jeep.Name = player.Name.."Jeep" for i,v in pairs(game.Workspace:FindFirstChild(player.Name.."Jeep"):GetChildren()) do if not v:IsA("Configuration") and not v:IsA("Script") then v.Rotation = player.Character.HumanoidRootPart.Orientation end end game.Workspace:FindFirstChild(player.name.."Jeep").Chassis.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) else game.ServerStorage.Configuration.Jeep:Clone().Parent = game.Workspace game.Workspace.Jeep.Name = player.Name.."Jeep" for i,v in pairs(game.Workspace:FindFirstChild(player.Name.."Jeep"):GetChildren()) do if not v:IsA("Configuration") and not v:IsA("Script") then v.Rotation = player.Character.HumanoidRootPart.Orientation end end game.Workspace:FindFirstChild(player.Name.."Jeep").Chassis.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) end end end)
a picture of how it turns out https://imgur.com/a/XW9Z4W0
You can use the SetPrimaryPartCFrame()
function to move the entirety of a model. I also tidied up the script a bit.
game.ReplicatedStorage.spawnjeep.OnServerEvent:Connect(function(player) if player.leaderstats.Money.Value >= 5000 then player.leaderstats.Money.Value = player.leaderstats.Money.Value - 5000 if game.Workspace:FindFirstChild(player.Name.."Jeep") then game.Workspac:FindFirstChild(player.Name.."Jeep"):Destroy() end game.Workspace:FindFirstChild(player.Name.."Jeep"):SetPrimaryPartCFrame(player.Character.HumanoidRootPart.CFrame) end end)
Just make sure you've set the primary part of the Jeep.