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

Why does this GUI not work?

Asked by 10 years ago

I want to make it so when you click a GUI, it makes a Smoke Trail on the specified players torso, but when you click on it again, it stops. Does anyone know why it doesn't work?

script.Parent.MouseButton1Down:connect(function(mouse)
    script.Parent.Style = "RobloxButtonDefault"
    if script.Parent.Style == "RobloxButtonDefault" then
        wait()
        Instance.new("Smoke",game.Workspace.xXScorpianKillerXx.Torso)
        repeat until script.Parent.Style == "RobloxButton"

    else
        script.Parent.Style = "RobloxButton"

    end
end)

1 answer

Log in to vote
-3
Answered by 10 years ago

Change

Instance.new("Smoke",game.Workspace.xXScorpianKillerXx.Torso)

to

Instance.new("Smoke",workspace)
0
He could keep it like that. Shawnyg 4330 — 10y
0
Oh, my bad I didn't notice that's what the parent is. Sorry. Wrongmistake 0 — 10y
Ad

Answer this question