I am wanting the boats to teleport to my player when i click a button but they only teleport to a players location once, and after the player moves the boats still spawn in that location.
In other terms is there any way to make it so the boats keep teleporting to the player when he clicks the button
why is playerpos outside the Button Event? move it in there and remove the while loop, as your making a ton of unnecessary connections. You may also try to use the Humanoid root part CFrame instead of its position, instead of making a new CFrame.
It seem that you have a connection inside of your while loop. I recommend just doing something like this , since the player position is updated when the mousebutton function is ran.
local button = script.Parent
local Raft = game.ReplicatedStorage["Admin Raft"]
button.MouseButton1Click:Connect(function()
local playerpos = game.Players:WaitForChild("1spritecupcake").Character.HumanoidRootPart.CFrame
local NewRaft = Raft:Clone()
NewRaft.Parent = workspace
NewRaft:PivotTo(playerpos)
end)