I know this question has been asked a lot. This really stumped me.
--client
local function connectClasses() --to play button
for _,v in pairs(menuclass:GetChildren()) do
wait()
if v:IsA('TextButton') then
if v.Name ~= 'Back' then
local inf = tinfo(.5,Enum.EasingStyle.Elastic)
spawn(function()
v.Button.MouseButton1Click:connect(function()
--print('clickitied')
spawn(function()
ClassSelected:InvokeServer(plr,v.Name)
end)
local goal = {}
goal.Position = menuout
local t0 = twn(menuclass,inf,goal)
t0.Completed:wait()
gbls.Debris:AddItem(startmenu,0)
spawned = true
main.Enabled = true
cam.CameraType = Enum.CameraType.Custom
end)
end)
end
end
end
end
--server
data.Combine("DATA","gold","sh_coins","class")
spawn(function()
glbs.Plrs.PlayerAdded:connect(function(Plr)
local goldstore = data("gold",Plr)
local shcoinstore = data("sh_coins",Plr)
local classstore = data("class",Plr)
function callRemote(remote,value)
sendDataToClient:InvokeClient(Plr,remote,value)
end
callRemote('Gold',goldstore:Get(500))
callRemote('Stronghold Coins',shcoinstore:Get(0))
callRemote('Class',classstore:Get('None'))
goldstore:OnUpdate(callRemote)
shcoinstore:OnUpdate(callRemote)
classstore:OnUpdate(callRemote)
end)
end)
classSelected.OnServerInvoke = function(Plr,Class)
callRemote('Class',Class)
return print('class remote called')
end
Any help is appreciated. I don't have any loops before any of this code.

1 comment
Thank you! I read somewhere yesterday that the player parameter was included in the client's firing. False info I guess.