idk y it doesn't work, so pls help. me new to lua
Script :
local remote = game:GetService("ReplicatedStorage"):WaitForChild("Menu") remote.OnServerEvent:Connect(function(Player, Value1, Value2) local data = Player:WaitForChild("Data") if Value1 == "Menu" then if data:WaitForChild("HasGame").Value == false then remote:FireClient(Player, "OpenEditor") character.HumanoidRootPart.CFrame = workspace:WaitForChild("CharacterCreateSpawn").CFrame else -- tp onto game lol end end end)
Output: ServerScriptService.Menu:8: attempt to index nil with 'HumanoidRootPart'
Also, I'm new to this website.