Weird Script Error

Hey Guys! I’m Currently doing a Commission and I am reaching an error

  1. I am just trying to make a simple clothing choice and I am Getting this Weird Error

  2. The error code is PlayerScripts is not a valid member of Player

  3. I have tried doing WaitForChild Incase it was running before the Scripts Finished Loading in.
    Here is the Code

script.Parent.Parent.Parent.Parent.Union.Start.MouseClick:Connect(function(player)
	script.Parent.Parent.Enabled = not script.Parent.Parent.Enabled
	player.PlayerGui.Controls.Main.Visible = true
	player.PlayerScripts.Keybinds.Disabled = false --This is What is Erroring out
end)

The PlayerScripts object is created locally. You are gonna want to handle the click detector client side.

How would I go about doing that?

Making what you currently have a local script, and placing it somewhere local scripts can run, and you will have to change a few paths.

Is it a screen gui or a click detector?

You could use RemoteEvents to access the PlayerScripts object on the client.

EDIT: I realized that this won’t work since you can’t access PlayerScripts via a RemoteEvent. You should use @incapaxx’s solution instead.

Click Detector, Also is there a way to detect a ImageButton is pressed on a Billboard GUI

I don’t know about the imageButton on a billboard gui but look at @Jaguar515_YT’s reply that’s what i think is right

I would do yours but my Script would need to be Multi functional, So I can make a Template and then just make others with no Coding Required

I Just Decided to put into the PlayerGui and It works!

1 Like