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

Making this script FE enabled? It won't work in FE games.

Asked by 6 years ago

Hello,

I need some help. I am ok with FE but this one is a little tricky for me.

local debounce = false

script.Parent.MouseButton1Down:connect(function()
    if debounce == false then
        pcall(function()
            debounce = true
            script.Parent.Parent:TweenPosition(UDim2.new(1, 5, 0, script.Parent.Parent.Position.Y.Offset), "Out", "Linear", 0.4)
            wait(0.5)
        end)
    end
end)

while wait() do
    if debounce == false and script.Parent.Parent.GoAway.Value == true then
        debounce = true
        script.Parent.Parent:TweenPosition(UDim2.new(1, 5, 0, script.Parent.Parent.Position.Y.Offset), "Out", "Linear", 0.4)
    end
end

How would I make this script work with FE?

Thank you,

Anthony

0
guis should be local anyway? User#5423 17 — 6y
0
Are you using a localscript? TheForgottenTale 23 — 6y
0
Who knows. Anyways, if he is, then he should read my bio. hiimgoodpack 2009 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

uh you forgot to make the debounce true again, also this will work with FE no matter what and the pcall is useless

0
I don't know what is up with this script but it does not work with FE. MisterThackeryBinx 29 — 6y
0
Antux, are you using a LocalScript? If you're not then switch it from a Script to a LocalScript! :) Hydrogyn 155 — 6y
Ad
Log in to vote
0
Answered by
Asceylos 562 Moderation Voter
6 years ago

You need to make debounce false again at the end of the script and make the script local.

Answer this question