im making a camping game and im working on a exit car button but when I click on it it says this frame is not a valid member of frame here are the 2 local scripts I use
local frame = script.Parent.Parent.frame local open = false
script.Parent.MouseButton1Click:Connect(function() if frame.Visible == false then frame.Visible = true else frame.Visible = false end end)
local character = game.Players.LocalPlayer.CharacterAdded:Wait()
script.Parent.MouseButton1Click:Connect(function()
if character:FindFirstChild("HumanoidRootPart") then
character.HumanoidRootPart.CFrame = CFrame.new(workspace.respawn.position)
end
end)
PS here screenshots https://imgur.com/KokOEwe https://imgur.com/G68Hgo2

1 comment
Use a code block