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.

6 comments
Where did you get the character from tho?
w0rkspace
Idk, where it lead to. I used free model lol
OMGOMGOMGOMG THX
Maybe learn scripting then? If you just copy-paste things from random free models without understanding what anything does or comes from, you're not exactly doing much.
Ur going to copy paste first & Learn from it. Then u can make one from ur self