I try to click a button in a gui, The Z index of the button is 4 And the gui display order is 1
local event = game.ReplicatedStorage.Events:WaitForChild("UpgardeEvent", 100) script.Parent.MouseButton1Click:Connect(function() local player = script.Parent.Parent.Parent.Parent print("A") local stat = script.Parent.Text local value = script.Parent.Parent.TextBox.Text print(player) event:FireServer(player, stat, value) end)
Here is how the order goes
Gui |_Frame (Z-Index 3) |_Button That does not work (Z-Index 4) |_Local Script
I Get no errors
local event = game.ReplicatedStorage.Events:WaitForChild("UpgardeEvent")--you dont need the time script.Parent.MouseButton1Click:Connect(function() print("A") local stat = script.Parent.Text local value = script.Parent.Parent.TextBox.Text event:FireServer(stat, value)--roblox automaticaly sends who fired the server so we dont need that end)
Check in your button properties if it's Active, If it's not turn it on.
If this helps you please accept my answer, It helps you and me