hi im working on a exit button for in a car for in a camping game but when I click on it it says humanoidrootpart is not a valid member of model here are the 2 local script I use
character = game.Players.LocalPlayer.character script.Parent.MouseButton1Click:Connect(function() character.Humanoidrootpart.Cframe.new(workspace.respawn.position) end)
local frame = script.Parent.Parent.frame local open = false
script.Parent.MouseButton1Click:Connect(function() if frame.visible ==false then frame.visible = false else frame.visible = false end end)

1 comment
Have you tried using CharacterAdded to obtain the character?