In my game, I have this script:
local xpos = script.Parent.Parent.positionblock.Position.X
local ypos = script.Parent.Parent.positionblock.Position.Y
local zpos = script.Parent.Parent.positionblock.Position.Z
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:FindFirstChild("Torso").Position = Vector3.new(xpos, ypos + 3, zpos)
end
end)
where positionblock is the block that marks the position I want to teleport the player to and the script is under the teleporter block, but this is not working in game. Both the teleporter block and positionblock are in the same model. What can I do to fix this script?
