generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Function error

Previous Thread :: Next Thread 
inception101 is not online. inception101
Joined: 19 Dec 2010
Total Posts: 738
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 is not online. RonDanino
Joined: 21 Dec 2012
Total Posts: 290
17 Nov 2015 08:16 AM
show the script?
Report Abuse
inception101 is not online. inception101
Joined: 19 Dec 2010
Total Posts: 738
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
inception101 is not online. inception101
Joined: 19 Dec 2010
Total Posts: 738
17 Nov 2015 08:33 AM
bump

-inception101 (Trade, Development, Design)
Report Abuse
jumpykilldestroy is not online. jumpykilldestroy
Joined: 15 Jul 2012
Total Posts: 12319
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
inception101 is not online. inception101
Joined: 19 Dec 2010
Total Posts: 738
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
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
17 Nov 2015 08:45 AM
"Passed value is not a function"

It clearly tells you the issue
Report Abuse
inception101 is not online. inception101
Joined: 19 Dec 2010
Total Posts: 738
17 Nov 2015 08:51 AM
Thanks for helping^
e.e

-inception101 (Trade, Development, Design)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image