Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I cant click a button in a gui?

Asked by 4 years ago

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

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
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)
0
ok, thank you. but that was't the problem i found a fix but thanks for answering! Real_BoomyBoomYT 10 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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

1
But you didnt help at all. So why would he accept your answer? RobloxGameingStudios 145 — 4y

Answer this question