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

ClickDetector is not a valid member of ClickDetector? What?

Asked by 9 years ago

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!

0
Where did you place the script? And is it a LocalScript or a Script now? Ekkoh 635 — 9y

2 answers

Log in to vote
1
Answered by 9 years ago

Simple spelling Error.

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

0
starterGUI? PyccknnXakep 1225 — 9y
0
Nah simple spelling error. jillmiles1 3 — 9y
Ad
Log in to vote
1
Answered by 9 years ago

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.

0
oh..... woops PyccknnXakep 1225 — 9y
0
Also, what does 'script' mean? On line 5 and 7. Grenaderade 525 — 9y
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. PyccknnXakep 1225 — 9y
0
Try script.Parent.NAMEOFSCRIPT Grenaderade 525 — 9y
View all comments (14 more)
0
ok PyccknnXakep 1225 — 9y
0
Nope, no luck. That does not work either. PyccknnXakep 1225 — 9y
0
Did you litterally put NAMEOFSCRIPT or the name of script? Grenaderade 525 — 9y
0
Yes I did. PyccknnXakep 1225 — 9y
0
Name of the script? Well if you did. Check your spelling on everything. Grenaderade 525 — 9y
0
Checked spelling and everything... still not working. PyccknnXakep 1225 — 9y
0
Put it in a LocalScript? Grenaderade 525 — 9y
0
Yup PyccknnXakep 1225 — 9y
0
I think I got it. gui.Parent = PlayerGui Grenaderade 525 — 9y
0
Nope. Don't work. PyccknnXakep 1225 — 9y
0
Then. I don't know. :/ Grenaderade 525 — 9y
0
:( PyccknnXakep 1225 — 9y
0
I'm not much of a master scripter. Grenaderade 525 — 9y
0
Oh. Ok PyccknnXakep 1225 — 9y

Answer this question