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

Teleporter Not Working When I Walk Into Teleporter, What Is Wrong With The Code?

script.Parent.Touched:connect(function(hit)
	local plaer = hit.Parent:findFirstChild("Humanoid")
	local lplayer = game.Players:GetPlayerFromCharacter(hit.Parent)
	if lplayer.leaderstats.Points.Value >= 5 then
		print('g1')
		if plaer then
			print('g2')
			plaer.Torso.CFrame = CFrame.new(-390, 20.5, 156)
		end
	end
end)

nothing happens at all when i walk into the teleporter, not even printing 'g1' (and yes, i do have 5 points),

2 comments

0

Make sure you got the if statement correct and change the humanoid root part's CFrame, not the torso.

0

Ok ill check that

1 answer

I just Reopened Roblox Studio And Now It's Working and changed 'lplayer' to 'player' and now it works

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