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

Why does this runservice loop not work after the button press's i made?

Asked by
len_ny 8
6 years ago

So I have 10 button press scripts above this runservice.Stepped function thats meant to update the distance between the localplayer's humanoidrootpart and everyone elses humanoidrootpart

I tried while wait() and now runservice.Stepped to get this to work, put it above and below the scripts and the only thing i get is that the button press scripts dont work

i cant put this into another script so any help?

local button1 = Instance.new('TextButton')
-- imagine 10 of these, i kinda wanna keep the project secret

button1.MouseButton1Down:connect(function()
    print('hi')
end)
-- it would print hi but wouldnt print bye
game:GetService('RunService').Stepped:connect(function()
    print('bye')
end)
0
You must define the parent and size of the button first in order to press it. If you just instert a textbutton, it has no size or parent. iiSxnic 5 — 6y

Answer this question