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

GUI button for a tool ability keeps saying that Its not a valid member of playergui?

Asked by 2 years ago

As the name says, when you equip the tool with the ability and press on the ability button, It basically morphs you Into a random character, but It for some reason doesn't work and says that Its not a valid member of playergui like If you ask me thats pretty dumb

Script:

local Button = script.Parent
local RemoteEvent = script.Parent.Parent.Parent.DisguiseEvent
local Debounce = false

Button.MouseButton1Click:Connect(function()
    if not Debounce then
        Debounce = true
        RemoteEvent:FireServer()
        Button.Text = "On Cooldown!"
        wait(10)
        Button.Text = "Use ability"
        Debounce = false

    end
end)

Answer this question