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

Lava teleports torso to a block in studio but not in game?

Asked by 8 years ago
function touch(hit)
    local char = hit.Parent
    wait()
    char.Torso.CFrame = workspace.LT.CFrame * CFrame.new(0,0,0)
end
script.Parent.Touched:connect(touch)
0
Hit might not be a character, or you have the r15 rig. Also, this is a bad question, add context ;p RubenKan 3615 — 8y
0
Local script or server sided script? You didn't include anything like @RubenKan said above. AstrealDev 728 — 8y

1 answer

Log in to vote
0
Answered by
Etheroit 178
8 years ago
script.Parent.Touched:connect(function(hit)
 if hit.Parent:FindFirstChild("Humanoid") then
 local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
 if plr ~= nil then
 hit.Parent.Torso.CFrame = game.Workspace.LT.CFrame * CFrame.new(0,1,0)
 end
 end
end)

1) Disable Filtering Enable (Workspace) 2) I prefer using this

Ad

Answer this question