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

Connecting a function twice? [closed]

Asked by
yoshiegg6 176
9 years ago

Is there a way to connect a function for two different things? Like this?

function pie()
print("text")
end

script.Parent.Touched:connect(pie)
game.Players.Player.Character.Humanoid.Changed:connect(pie)
1
Yes and that seems to work fine. FearMeIAmLag 1161 — 9y

Locked by AmericanStripes

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
9 years ago

Your code is exactly correct.

Please, in the future, test your own code before asking about it here. You would have seen that your code works had you taken a minute to test it.

Ad