I'm attempting to remake a room assignment GUI for a hotel I had made before the FE force switch. Essentially how this works is you type a players name into the GUI, hit enter, then the room number, then hit enter and the player will receive that key. I changed to using RemoteEvents in local scripts. So, there are four scripts: two for the room assignment, and two for the name assignment. Since the error is the same for both, I will post the name one. My issue comes in game when the "ControlGui" is not found in the Player's "PlayerGui" issue is on ServerScriptService.Name line 7.
Serverscript:
replStorage = game:GetService("ReplicatedStorage") local remote = replStorage:WaitForChild("RemoteName") name2 = "" person = "" remote.OnServerEvent:Connect(function(player) print(player) local tbox = player.PlayerGui.ControlGui.Background.AdminFrame.cabinBox print(player.PlayerGui.ControlGui.Background.AdminFrame.cabinBox) name2 = tbox.Text local length = string.len(name2) local players = {} for i,v in pairs(game.Players:GetChildren()) do table.insert(players,v.Name) end for i,v in pairs(players) do if string.sub(players[i] ,0,length) == name2 then person = players[i] end end game.Lighting.Name1.Value = person end)
LocalScript:
replStorage = game:GetService("ReplicatedStorage") local remote = replStorage:WaitForChild("RemoteName") script.Parent.MouseButton1Click:connect(function() remote:FireServer() end)
Any help would be greatly appreciated!