|
| 17 Nov 2015 08:13 AM |
09:10:25.746 - Attempt to connect failed: Passed value is not a function 09:10:25.747 - Script 'Players.Player.PlayerGui.CharCustomize.Script', Line 66 09:10:25.747 - Stack End
I have only one connection line to this function, and as soon as I enter the game in test mode, it runs the function once (even though I haven't called the function yet), and it gives me this stupid error.
-inception101 (Trade, Development, Design) |
|
|
| Report Abuse |
|
|
RonDanino
|
  |
| Joined: 21 Dec 2012 |
| Total Posts: 290 |
|
| |
|
|
| 17 Nov 2015 08:20 AM |
function CreateNotif(Text) if Debounce then Debounce = false print("B") NumberOfNotifs = NumberOfNotifs + 1 NewNotification = NotificationModel:Clone() NewNotification.Name = "Notification"..NumberOfNotifs NewNotification.Parent = CharCustomizeGUI NewNotification.Text = Text PositionNotif() DropNotif(NewNotification:GetFullName()) print(NewNotification:GetFullName()) end end
game.workspace.Button.ClickDetector.MouseClick:connect(CreateNotif("Test"))
-inception101 (Trade, Development, Design) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2015 08:33 AM |
bump
-inception101 (Trade, Development, Design) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2015 08:37 AM |
fixed and reasons why its broken:
function CreateNotif(Text) if Debounce then Debounce = false print("B") NumberOfNotifs = NumberOfNotifs + 1 NewNotification = NotificationModel:Clone() NewNotification.Name = "Notification"..NumberOfNotifs NewNotification.Parent = CharCustomizeGUI NewNotification.Text = Text PositionNotif() DropNotif(NewNotification:GetFullName()) print(NewNotification:GetFullName()) end end
game.workspace.Button.ClickDetector.MouseClick:connect(function()CreateNotif("Test")end)
your supposed to input a function like this: MouseClick:connect(FunctionVariable)
but when you do this: MouseClick:connect(FunctionVariable('lol')) then your calling the function because of the () |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2015 08:42 AM |
Can you PM me so I can better understand why its broken? Thanks!
-inception101 (Trade, Development, Design) |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2015 08:45 AM |
"Passed value is not a function"
It clearly tells you the issue |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2015 08:51 AM |
Thanks for helping^ e.e
-inception101 (Trade, Development, Design) |
|
|
| Report Abuse |
|
|