Information about locations of objects used; Local script (Client script) -- Inside PlayerGui. Script (Server script) -- Inside ReplicatedFirst, as a child of another Script. RemoteEvents (Folder) -- Inside Workspace. CustomerEvent (RemoteEvent) -- Inside Workspace, as a child of RemoteEvents (Folder)
LocalScript
local CustomerBusy = false
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("Model") and v.Name == "HotelConsole" and v:FindFirstChild("CustomerConsole") then
print("Console found")
v.CustomerConsole.CD.MouseClick:connect(function(plr)
print("Console clicked!")
local Cash = plr.PlayerGui:WaitForChild("Stats").Cash
if CustomerBusy == false and Cash.Value >= 500 and plr.PlayerGui.Stats.AwaitingConfirmation.Value ~= true and plr.PlayerGui.Stats.PlayerHasRoom.Value ~= true then
print("Passed test!")
CustomerBusy = true
v.SellerConsole.Beep:Play()
print("Play beep!")
game.Workspace.RemoteEvents.CustomerEvent:FireServer(v)
print("Sent request to server!")
CustomerBusy = false
print("End")
end
end)
end
end
Local script prints all the way up to "print("End")" Local script IS working. Issue seems to be the Server script..
Server Script
local CustomerBusy = false
game.Workspace.RemoteEvents.CustomerEvent.OnServerEvent:connect(function(plr, model)
print("Event detected")
if CustomerBusy == false then
CustomerBusy = true
plr.PlayerGui.Stats.AwaitingConfirmation.Value = true
model.CustomerConsole.CD.MaxActivationDistance = 0
model.CustomerConsole.CustomerName.Value = plr.Name
model.SellerConsole.BrickColor = BrickColor.new("Lime green")
model.SellerConsole.CD.MaxActivationDistance = 15
end
end)
Does not print "print("Event detected")"
Help?

3 comments
Well, the script works now, but "Stats is not a valid member of PlayerGui" .. I remember a friend mentioning you can't access a player's playergui with FE.. how can I get around this?
It's not an easy problem to get around if you're trying to use the ValueObjects: they're inherently unsafe. What you can do is maintain a Table list of all Players and what their stored data is (aka - AwaitingConfirmation) on the Server, and each player specifically on their own Client using the ValueObjects you already have set up.
I figured out a solution, relatively simple actually.. xD game.Players.PlayerAdded:connect(function(plr) local stats = game.ReplicatedStorage:WaitForChild("Stats"):Clone() stats.Name = plr.Name stats.Parent = game.ReplicatedStorage end)