Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

2 comments

0

Hit might not be a character, or you have the r15 rig. Also, this is a bad question, add context ;p

0

Local script or server sided script? You didn't include anything like @RubenKan said above.

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.