Hello. I’m having a pretty weird issue. My issue is this:
I have a GUI being edited by a local script, and the value changes in the explorer, but never visually changes.
This is the code in a local script:
local MouseService = game.Players.LocalPlayer:GetMouse()
UserInputService = game:GetService("UserInputService")
print("Loading...")
Hud = script:WaitForChild("WeaponHud",9999999)
print("Hud Loaded?")
if Hud then
print("Found Hud")
Hud.Parent = game.Players.LocalPlayer.PlayerGui
TotalAmmoDisplay = Hud:WaitForChild("Frame",999999999):WaitForChild("TotalAmmo",999999999)
print("Found AmmoDis")
AmmoCurrent = Hud:WaitForChild("Frame",999999999):WaitForChild("ClipAmmo",999999999)
print("FoundAmmoCurrent")
TotalAmmoDisplay.Text = SettingsService.Settings.Ammo.ClipStorage - 0 --0 IS needed.
else
error("[Green's Weapon System]: Failed to Find HUD.")
end
print("next")
Tool:WaitForChild("ModifyGui").OnClientEvent:Connect(function(AmmoVar)
print("Editing "..tostring(AmmoVar))
AmmoCurrent.Text = tostring(AmmoVar)
end)
print("Rest is FINE")
And this is the server script part that fires it:
script.Parent.ModifyGui:FireClient(player,Ammo)
This is a pretty big issue for me, because I have a client waiting on this.
Anyone know a solution?