Heyyy. I have a problem. I am currently trying to make a GUI that changes Players coins to any amount given by admins. Now, I am trying to get the Coin Amount from the PlayerGui, that is from the Admin. But I get following error:
15:17:53.964 - Infinite yield possible on 'Players:WaitForChild("Instance")' 15:17:53.965 - Stack Begin 15:17:53.965 - Script 'ServerScriptService.CoinChanger', Line 3 15:17:53.966 - Stack End
And it doesnt print the Coin Amount, which is for testing.
Thats the script.
local function CoinChange(player)
print(player)
local PlayerGui = game.Players:WaitForChild(player).PlayerGui.Admin.Admin.Coins.CoinsAmount.Value
print(PlayerGui)
end
game.ReplicatedStorage.CoinChange.OnServerEvent:Connect(CoinChange)

1 comment
you need to look into remote events and functions https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events :)