It cant teleports. Output is "couldnt find player"
game.Players.PlayerAdded:Connect(function(plr)
plyr = script.Parent
game.ReplicatedStorage.teleport.OnServerEvent:Connect(function()
if plyr ~= nil then
if plyr.WaitForChild("HumanoidRootPart") ~=nil then
plyr.WaitForChild("HumanoidRootPart").CFrame = CFrame.new(16.5, 5.5, -11.5)
print("humanoidrootpart is found")
else
print("couldnt find humanoidrootpart")
return
end
else
print("couldnt find player")
end
end)
end)

2 comments
Big thanks. Im newbie on LUA and this is help me for my skills
You're welcome, please mark as an answer if it helped.