This is my script: local button = script.Parent local name = script.Parent:WaitForChild("ElementName") local message = script.Parent.Parent.Parent.ChoiceFrame:WaitForChild("ConfirmationMessage") local frame = script.Parent.Parent.Parent:WaitForChild("OptionFrame") local sound = script.Parent:WaitForChild("Splash") local fire = script.Parent.Parent:WaitForChild("FlameReaper") local water = script.Parent.Parent:WaitForChild("Aqua") local earth = script.Parent.Parent:WaitForChild("EarthGuardian")
button.MouseButton1Down:connect(function() if frame.Visible == false then frame.Visible = true message.Text = "Are you sure you want to choose "..name.Value..", a Water type Element as your starter Element? Answer with ('Yes' or 'No')" if earth.Visible == true then earth.Visible = false if water.Visible == true then water.Visible = false if fire.Visible == true then fire.Visible = false end end end end end)
button.MouseEnter:connect(function() wait(0.2) sound:Play() sound.Volume = 0.5 wait(1) end)
button.MouseLeave:connect(function() wait(0.2) sound.Volume = 0 sound:Play() wait(1) end)
This is the error, help me fix it please I tried so many times no matter what I do it won't work ChoiceFrame is not a valid member of ScreenGui

2 comments
I will try this out thanks for trying to help
This helped, This worked You awesome answer accepted