Tool Mouse Connect Error

Hey there i tried to make a script for a part today and it worked out great because it was for a 2x rebirth system (simulator)
but then I tried to make the part script to a starterplayertool localscript and i dont know why but it doesnt work


this is the only output
image
how do I make the script know that when the mouse is clicked either 2 of the operations happen
either a) If no rebirths (0) then 1x times of the Item (here item is anything that can be measured)
or b) if the player has more than 0 rebirths then 2x, 4x,6x,8x etc

any kind of help is appreciated

1 Like

You didn’t close off the Button1Down event, you need to add another end) at the end of the script

Also, game.player doesn’t exist. From what I can tell this is a localscript, make a variable containing game:GetService("Players").LocalPlayer inside of it, and change game.player to the reference of that variable. Also, your value changes are local, if you want it to change to the server as well, recommend you use a RemoteEvent

3 Likes

Thanks mate!
now it works fine :grinning_face_with_smiling_eyes:
im still learning more about scripting.

1 Like

Anytime! If you have anymore issues don’t be afraid to make another post!

And good luck on your scripting journey!

1 Like