Problem with teleporter pad (Don't find player folder)

I’m making a teleport pad, but for some reason it doesn’t find one folder inside the player.

Script (server):

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local plr = game.Players:GetPlayerFromCharacter(script.Parent)
		if plr.PlrStats.Level.Value <= 10 then -- error here
			hit.Parent.HumanoidRootPart.CFrame = workspace.level10teleport.CFrame
		end
	end
end)

The PlrStats folder is created on a server script made for datastore load.

In the GetPlayerFromCharacter you pass in script.Parent, did you mean to pass in hit.Parent?

2 Likes

Oh, how I didn’t see that :thinking:

Thank you!

Very time I don’t see you here on my posts!

1 Like