Hello, this is a piece of code I had done for me about a year back. I am no longer in touch with the developer, and am clueless as to the error that is being stated and why. My Job Menu GUI has not been opening lately, and I am not sure why but I get the error:
‘’’ 23:01:53.814 - Infinite yield possible on ‘ReplicatedStorage:WaitForChild(“GameAnalyticsFiltering”)’
23:01:53.814 - Stack Begin
23:01:53.815 - Script ‘Players.momo6097.PlayerScripts.GameAnalyticsClient’, Line 14
23:01:53.815 - Stack End
23:01:56.678 - Infinite yield possible on ‘Players.momo6097:WaitForChild(“leaderstats”)’
23:01:56.679 - Stack Begin
23:01:56.680 - Script ‘Players.momo6097.PlayerGui.Job.GUIHandler’, Line 2’‘’
I know that is a large vague error, and I’m sorry for not being better informed going into this; but I figured the best option was reaching out to the community for some insight. Ill attach the two lines of code:
`local Player = game.Players.LocalPlayer
local Job = Player:WaitForChild("leaderstats")
local Main = script.Parent.Main
local OpenB = script.Parent.Open
local IsOpen = false
local Debounce = false
local JobDebounce = false
function Open()
IsOpen = true
Main:TweenPosition(UDim2.new(0.5,0,0.5,0),"In","Quad",0.5)
end
function Close()
IsOpen = false
Main:TweenPosition(UDim2.new(1.5,0,0.5,0),"Out","Quad",1)
end
OpenB.MouseButton1Click:Connect(function()
if IsOpen == false and Debounce == false then
Debounce = true
Open()
wait(1)
Debounce = false
elseif IsOpen == true and Debounce == false then
Debounce = true
Close()
wait(1)
Debounce = false
end
end)
for i,v in pairs(Main:GetChildren()) do
if v:IsA("TextButton") then
v.MouseButton1Click:Connect(function()
--if JobDebounce == 0false then
JobDebounce = true
game.ReplicatedStorage.Events.ChangeJob:FireServer(v.Name)
Close()
wait(60)
JobDebounce = false
--end
end)
end
end`
Second Piece:
'if script.Parent.ClassName ~= “PlayerScripts” then
error(“GameAnalytics: Disabled client”)
return
end
–Variables
local GameAnalyticsFiltering = game:GetService(“ReplicatedStorage”):WaitForChild(“GameAnalyticsFiltering”)
–local GameAnalyticsSendMessage = game:GetService(“ReplicatedStorage”):WaitForChild(“GameAnalyticsSendMessage”)
--Services
local GS = game:GetService("GuiService")
local UIS = game:GetService("UserInputService")
--Functions
function getPlatform()
if (GS:IsTenFootInterface()) then
return "Console"
elseif (UIS.TouchEnabled and not UIS.MouseEnabled) then
return "Mobile"
else
return "Desktop"
end
end
--Filtering
GameAnalyticsFiltering.OnClientInvoke = getPlatform'
Once again, anything you guys could do in order to help me is greatly appreciated. I'm trying to familiarize myself with code, but I'm not advanced to solve issues. If I gave you insufficient or too much information, please let me know and I'll be happy to provide anything.
Im trying to edit the information (The second piece of code) so I can get it all into the script box; but I’m having a dumb moment so forgive me.