if this question has been answered before just direct me there, if not then I'd (obviously) ask for the answer to this problem:
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then torso = hit.Parent:FindFirstChild("Torso") if torso ~= nil then torso.Position.CFrame = CFrame.new(Vector3.new(-6, 0.5, -12)) end end end)
now I understand its probably better to use a local script, but in certain cases it may be better to use scripts inside the two parts anyway- and actually I've made another teleporter using a local script, the syntax is the same for going through the character and torso and cframe- and it works, but here it doesn't. why is this? I think the problem lies within getting to the players character, or maybe it would be slightly different outside a local script for whatever reason. (that's just my thoughts)
Your problem is with line 7. Here you wrote:
torso.Position.CFrame = CFrame.new(...)
What I assume you meant to write is:
torso.CFrame = CFrame.new(...)
Position holds a Vector3 value, which doesn't have a member called CFrame
.