Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How come my R15 Teleportation Script is not teleporting the players when they touch a brick?

Asked by
SpiralRBX 224 Moderation Voter
5 years ago



function teleportPlayer(pos, torso) local char = torso char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z)) end function onTouched(part) if part.Parent ~= nil then local h = part.Parent:findFirstChild("Humanoid") if h~=nil then teleportPlayer(Vector3.new(-3087.8, 35.23, -7248.44) , part.Parent.UpperTorso) -- Change this to make it R6. --Change the numbers above to the place you want to --teleport people to. end end end script.Parent.Touched:connect(onTouched)

It is not teleporting the players when they touch this brick.

0
use the HumanoidRootPart not the Torso DeceptiveCaster 3761 — 5y
0
try to use char.Parent.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(pos.X, pos.Y+7, pos.Z)) also :connect and :findFirstChild is deprecated. use :Connect and :FindFirstChild, if you want do make changes in char simple, on moment to send UpperTorso, only send HumanoidRootPart yHasteeD 1819 — 5y
0
Change char from Torso to LowerTorso Vereseq 20 — 5y

1 answer

Log in to vote
1
Answered by
Vereseq 20
5 years ago
local char = LowerTorso

R15 has several parts to a torso, so you have to clarify which part.

0
The char is the player, and the player of the function is torso. SpiralRBX 224 — 5y
Ad

Answer this question