Hello, I am beginner coder
and I have a problem so there are 2 buttons first is button 1 and button 2 so when I press button 1 it would give me 30$ (because if the boost is not applied then it is 1$) but when I purchase a new button for 1000$ and if I would press on it, it gives me 1000$ instantly rather than giving me 10$ per presses
I want that when the player touches it it would give him 10$ rather than 1000$ instantly and from nowhere
wait, i think its giving you 1k because you have the 3x boost because 10³ is 1000
Hey it did not put the boost for button 2 I only added it for button 1
I assume this is button 2 script
You have the locals still there so I’d assume the 3x is working on button 2
there seems to be no bounce on your touched function so it might be called 30x per second.
Did you remove the 1000$ in a server script? If you did it in a local script then it won’t replicate, causing the server to give you 1000$ out of nowhere
I did it in server? is that is why it is getting replicated? How can I fix it?
Uhh no 3x are all working only on button 1 not button 2
I tested it out before also but it did not happen like that? And how can I make bounce ?
local bounce = false
function ontouched(hit)
if bounce then return end
bounce = true
--your stuff here
wait(.5)
bounce = false
end
Try add something like that.
Also make sure ur not spawnin 100 buttons
Try changing the cost of the button, if it instantly gives you that amount then it’s a replication problem.
Make sure the button purchase script is in ServerScriptService (or some part in workspace). View the Cash value on the server after purchasing the button and after touching the button.
It’d be nice if u did
Placed script like this.
yeah sorry i would do it next time
the script is in the part itself but it is also replicating?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.