local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(player)
player.Character.HumanoidRootPart.Position = workspace.StageSpawn1.Position -- Change "Teleportpart" To your part name
player.Character.Humanoid.WalkSpeed = 0
player.Character.Humanoid.JumpPower = 0
end)
You should use variables to shorten down your code first of all.
Secondly, teleporting them to the part’s position will make it teleport inside of it, as that’s the center of it.
You can add a Vector3.new() and modify the Y axis.
If you want them to look a certain way after “teleporting”, you can change their CFrame instead of their position.
Instead of using Position, you should use CFrame like @DecodedString said. And I would also suggest moving the part a bit up, so the player wouldn’t get stuck.
He can always make an inivisible and non-collidable part to server as a position pinpoint, but there’s nothing wrong with working with a bit of math just makes you smarter
Thanks everyone! I finally managed to solve it!
Edit: I did this: player.Character.HumanoidRootPart.CFrame = script.Parent.Parent.CFrame + Vector3.new(0, 1, 0)
I’m not saying you shouldn’t learn the Math, but taking into consideration that he’s a beginner, it would be much simpler to just do this. And of course, you should defo try to learn the Math.
Great! Math plays an integral role in programming, and you should defo learn it! But in minor cases like these, it would be more efficient to do it without Math. Just my opinion.