Issues with coins system

hello :wave:

I have some issues with coins system

(issues)

in this video the issues

like you see the player dont get 3 coins the player get 2k coins!

the script (the script is not localscript and his parent ServerScriptService)

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)

	plr.lod.coins.Value += 3
	print("player get 3 coins")

end)

How many times does it print “player get 3 coins”? If you used a touch event for the coin, it could send out a signal multiple times, giving way more coins than it’s supposed to.

1 Like

can you please show the local script

thank you porated for reply

my coins is 2k
image

but i spent it

then

i touch the coin for get coins (the coins i spent its return)

its not local script

its script

Yes but we will still need the local script code that fired the event

1 Like

can you send the code of the local script i mean

i try it and its work (but datastore dont save)

we cannot help you without the script

this is script

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)

	plr.lod.coins.Value += 3
	print("player get 3 coins")

end)

like i said many times, i talk about the local script

and you said data store ? do you know what is data store ? because your script has no relation with data stores

clone.coinsbug.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and game.StarterPlayer.StarterCharacterScripts.coinsvaluebug1.Value == true then
		print("its work")
	clone.coinsbug.CanTouch = false
       
		clone.DeleteThis.Position = Vector3.new(-590.533, 13.233, 581.946)
		clone.thype.Position = Vector3.new(-590.533, 13.233, 581.946)
		clone.coinswork:MoveTo(Vector3.new(-590.533, 13.233, 581.946)) 
		game.StarterPlayer.StarterCharacterScripts.coinsvaluebug1.Value = false
		 game.ReplicatedStorage.RemoteEvent:FireServer(plr)

this is local script
i sorry i dont understand what do you mean

when i change the script from normal script to localscript the coins dont save

what is this ?

game.StarterPlayer.StarterCharacterScripts.coinsvaluebug1.Value

its boolvalue
if coinsvaluevug1.value = true *the coins spawn

can you send a photo of the output ?

i want to change some things in coins system

after i change it
i sent for you the output

thank you for help

i fix it

its small issues :blush: