So i created portals and i input a script in them. But for some reason it kills me when i step in it, this is the script for both parts.
script.Parent.Touched:Connect(function(hit)
local player = hit.Parent
if player then
local torso = player.HumanoidRootPart
if torso then
torso.Position = Vector3.new(44.5, 111, 30)
end
end
end)
Just Move the Character Model using Model:MoveTo()
local hum = hit.Parent:FindFirstChild("Humanoid") -- to ensure the item is a character model by getting the Humanoid
if hum then -- if the Humanoid Exists
hum.Parent:MoveTo(Vector3.new(44.5, 111, 30)) -- moves Model which is their character
end