Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My script is saying this Destroy is not a valid member of BoolValue "Players.jamlineking.InMenu?

Asked by 2 years ago
Edited 2 years ago
game.Players.PlayerAdded:Connect(function(player)

    local InMenu = Instance.new("BoolValue")
    InMenu.Name = "InMenu"
    InMenu.Parent = player

end)

game.ReplicatedStorage.MenuPlay.OnServerEvent:Connect(function(player)
    if player:FindFirstChild("InMenu") then 
        player.InMenu:Destory()
    end
end)

2 answers

Log in to vote
0
Answered by 2 years ago

You're calling ":Destory()," not ":Destroy()."

Ad
Log in to vote
0
Answered by 2 years ago

You made a typo, man. Type Destroy:() not Destory:()

Answer this question