I'm trying to make it so that a player is transported from one object to the other by stepping on it, but this error keeps showing up and I have no idea how to fix it.
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') then hit.Parent.Torso.CFrame = CFrame.new(439.763, 4.144, 128.675) end end)
Any help please?
There are two types of default character rigs on Roblox. One is called R15 and the other is called R6 (as you might know already). Different rigs use different names for body parts. For example, the torso is called Torso
in R6 rigs and UpperTorso
for R15 rigs. In your case, this would simply mean that you would have to change hit.Parent.Torso
to hit.Parent.UpperTorso
. However, it's better to use HumanoidRootPart
as it's consistent amongst all character rigs.
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.HumanoidRootPart.CFrame = CFrame.new(439.763, 4.144, 128.675) end end)