Hey, I have problem with my remote function.
This is how it should work: When a player press a button in the gui on the screen a red frame will appear for all players on that button. This is so it's not possible to press the button for the other players but also the player that pressed the button.
Nothing happens when I press the button, I only get this warning "Infinite yield possible on 'ReplicatedStorage:WaitForChild("BalancingTileRed")'"
Does anyone know what is wrong with my script?
ServerScript
local rs = game:GetService("ReplicatedStorage")
local BalancingTileRed = rs:WaitForChild("BalancingTileRed")
local function balancingTileRed(player)
if rs.ChooseNextGame.BalancingTile == "Balancing Tile" then
script.Parent.Visible = true
script.Parent.Parent.Visible = false
end
end
BalancingTileRed.OnServerInvoke = balancingTileRed
LocalScript
local rs = game:GetService("ReplicatedStorage")
local BalancingTileRed = rs.Remotes:WaitForChild("BalancingTileRed")
local changeToRed = BalancingTileRed:InvokeServer()
Thanks for the help, Xsodar

3 comments
Thank you, that removed my warning, but nothing happens when I click the button, do you know why? Or is it another way I can send value from 1 client to all the other one?
I honestly don't know how to work with remote functions but I think your desired results can be accomplished with remote events. I'll edit my answer rq
i assume it's because of;; if rs.ChooseNextGame.BalancingTile;; you probably forgot [.Value], should be;; if rs.ChooseNextGame.BalancingTile.Value;; Also why'd you use remote function for UI updates