Hey, I’m currently creating some speedboats to add to my cafe game, and I added a chat command that removes all the boats in the game and respawns them after some time. I’ve successfully created this, however the boats are models and I’m wondering how to set the boat CFrames back to the original spawn position after respawn.
My current code:
local GroupId = 10946784
local AllowedRank = 15
local nil1 = game.Workspace.Boat
local nil2 = game.Workspace.Boat2
game.Players.PlayerAdded:Connect(function(Player)
Player.Chatted:Connect(function(chat)
if chat ==":removeboats" and Player:GetRankInGroup(GroupId) >= AllowedRank then
nil1.Parent = nil
nil2.Parent = nil
wait(20)
nil1.Parent = game.Workspace
nil2.Parent = game.Workspace
else
end
end)
end)
Sorry for late reply, for this you should connect all the model parts together by using Weld, you can use Easy Weld tool for this. After that, determine the base part of the model and change it CFrame because changing to Position would break the weld. If you need an example, ask me.
Now, for the OriginPos, change it to CFrame.new(x,y,z), after that down below, you have to find the BasePart of the model, for easier, do BoatModel.PrimaryPart.CFrame = OriginPos.