hello
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
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:34pm
3
can you please show the local script
thank you porated for reply
my coins is 2k
but i spent it
then
i touch the coin for get coins (the coins i spent its return)
Yes but we will still need the local script code that fired the event
1 Like
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:42pm
7
can you send the code of the local script i mean
i try it and its work (but datastore dont save )
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:44pm
9
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)
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:49pm
11
like i said many times, i talk about the local script
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:50pm
12
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
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:53pm
15
what is this ?
game.StarterPlayer.StarterCharacterScripts.coinsvaluebug1.Value
its boolvalue
if coinsvaluevug1.value = true *the coins spawn
FurukanDev
(TheFurukanDev)
August 30, 2022, 9:58pm
17
can you send a photo of the output ?
Perer1111
(Perer)
August 30, 2022, 10:01pm
18
i want to change some things in coins system
after i change it
i sent for you the output