Hello! Im trying to figure out how a player can enable and disable the Marker in a settings menu does anyone know how to fix this issue possible to edit the script below since it doesnt quite work lol
Player = game.Players.LocalPlayer
Button = script.Parent
Marker = game.Workspace.WorkspaceMaps:FindFirstChild("Hitbox").Marker
script.Parent.MouseButton1Click:Connect(function()
if Marker == true then
Marker.Enabled = false
elseif Marker == false then
Marker.Enabled = true
end
end)
FindFirstChild only works for the direct children of it, so it will return nil. You could do :FindFirstDescendant(), but since there are multiple maps you don’t know which marker it will return.