remove the wait time on the client one
So i fixed it, but this is not the best way to do it
Server Side :
remote1.OnServerEvent:Connect(function(player, player2, amount)
local PlayerToGive = game:GetService("Players"):FindFirstChild(player2.Name)
if not PlayerToGive then return end
print(PlayerToGive)
remote2:FireClient(PlayerToGive, amount)
print(player.Name.." Has Give "..amount.." To "..PlayerToGive.Name)
end)
Client Side :
remote2.OnClientEvent:Connect(function(amount)
print("arrived on client")
label.Text = amount
end)
I did remove it, and it doesn’t change anything does it ?
I guess the problem comes from my side then. Here is it with your code
So that’s what u was trying to do right?
Yes it is, but apparently it doesn’t work on my side
what do you mean in your side?!
as you can see, we used the same script, but it doesn’t work for me, while it does for you. It means the problem doesn’t come from the script but from roblox studio
Can you take screenshot for the Client Script in your Explorer
Its located in starter gui but you want me to show the whole script ?
yes, and screenshot where it located in Explorer if u can
Oh big oof,
You can’t put anything blow while loop coz it will keep running forever
only if you brake it at some Point
at this case you can use coroutine or you can Use Spawn() function
to ignore the while loop when its running
spawn(function()
while true do
wait()
end
end)
remote2.OnClientEvent:Connect(function(amount)
print("arrived on client")
label.Text = amount
end)
or coroutine
coroutine.resume(coroutine.create(function()
while true do
wait()
end
end))
remote2.OnClientEvent:Connect(function(amount)
print("arrived on client")
script.Parent.Text = amount
end)
This Should Fix You Problem
Im starting to feel stupid
thanks a lot for your help and your time !