{ERROR}Click point script error (FIX)

  1. What do you want to achieve? When we
    Points = 20 in the leaderboard, reset points, But after that we have XP = +1.

  2. What’s the problem?
    ERROR

1 It does not respond to pressing 2. does not give points

script.Parent.ClickDetector.MouseClick:Connect(function(player)
	
	local PlayerPoind = player.leaderstats.Points
	PlayerPoind.Value = PlayerPoind.Value + 1

	local XP = player.leaderstats.XP --XP.Value = XP.Value + 1 
	if PlayerPoind.Value <=20 then
		PlayerPoind.Value =  PlayerPoind.Value 
		XP.Value = 1
	end
end)
  1. Which solutions have you already tried? I looked for 5-10 minutes and did not find if there is such a form, then help and tell me how to do it right.

Could you send a picture of the part your clicking in the explorer?

Looks like you have the a script in the workspace and not inside a basepart. Move the script as a child to the part you want them to click and make sure you add a clickdetector object as a child to that part also.

Forgive me for not immediately answering, I’m new here, how to open the explorer?

It responds to pressing and gives points, but there is a new defect, I press for the first time and it gave 1XP. and Points After that, he gave only points,Nothing else is happening.

I solved the error, it was that I incorrectly indicated the points and XP

And did not put in the button itself

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.