Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

ClickDetector is not a valid member of ClickDetector? What?

This is the script:

local gui = script.Parent.Parent.night_GUI:Clone()
function click()
	gui.Parent = game.Players.LocalPlayer.PlayerGui
	wait(1)
	script.Disabled = true
	wait(60)
	script.Disabled = false
end
script.Parent.ClickDetector.MouseClick:connect(onClick)

I've went through and checked it, but still same Console Error: ClickDetector is not a valid member of ClickDetector Remember, this is not a LocalScript. any help please? Thanks!

1 comment

0

Where did you place the script? And is it a LocalScript or a Script now?

2 answers

✓ Accepted answer

Simple spelling Error.

script.Parent.ClickDetector.MouseClick:connect(click)

2 comments

0

starterGUI?

0

Nah simple spelling error.

Make it a local script. LocalPlayer doesn't run in a normal script. Also:

script.Parent.ClickDetector.MouseClick:connect(click)

OnClick isn't the name of the function. It's click.

18 comments

0

oh..... woops

0

Also, what does 'script' mean? On line 5 and 7.

0

You know, script.Disabled? Its the Disabled property of a script. Also, I changed it to click and in a localscript, but still not working.

0

Try script.Parent.NAMEOFSCRIPT

0

ok

0

Nope, no luck. That does not work either.

0

Did you litterally put NAMEOFSCRIPT or the name of script?

0

Yes I did.

0

Name of the script? Well if you did. Check your spelling on everything.

0

Checked spelling and everything... still not working.

0

Put it in a LocalScript?

0

Yup

0

I think I got it. gui.Parent = PlayerGui

0

Nope. Don't work.

0

Then. I don't know. :/

0

:(

0

I'm not much of a master scripter.

0

Oh. Ok

This discussion is preserved as it was. New answers, comments, and votes are closed.