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 » Scripting Helpers
Home Search
 

Re: My script will not work :/

Previous Thread :: Next Thread 
OzzyBlox is not online. OzzyBlox
Joined: 04 Nov 2009
Total Posts: 14166
21 Jan 2013 11:56 AM
local button = game.workspace.resolute
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1

function MouseClick(resolution)

Instance.new("Message")
Message.text = "3"
wait(1)
Message.text = "2"
wait(1)
Message.text = "1"
wait(1)
Message:remove()

local lolboom = Instance.new("Explosion", button)
lolboom.Position = button.Position
sound:play()

end

button.ClickDetector.MouseClick:connect(resolution)


Output says I'm trying to call a nil value.
Report Abuse
megaguy44 is not online. megaguy44
Joined: 28 Sep 2008
Total Posts: 1066
21 Jan 2013 11:58 AM
local button = game.workspace.resolute
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1

function MouseClick(resolution)

local Message = Instance.new("Message")
Message.text = "3"
wait(1)
Message.text = "2"
wait(1)
Message.text = "1"
wait(1)
Message:remove()

local lolboom = Instance.new("Explosion", button)
lolboom.Position = button.Position
sound:play()

end

button.ClickDetector.MouseClick:connect(resolution)


print('Hello World!')
Report Abuse
OzzyBlox is not online. OzzyBlox
Joined: 04 Nov 2009
Total Posts: 14166
21 Jan 2013 11:59 AM
Output still gives me the same thing.

"Attempting to call a nil value"
Report Abuse
SpamCIean is not online. SpamCIean
Joined: 19 Jan 2013
Total Posts: 6
21 Jan 2013 12:00 PM
local button = game.workspace.resolute
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1

function resolution(r)

Instance.new("Message")
Message.text = "3"
wait(1)
Message.text = "2"
wait(1)
Message.text = "1"
wait(1)
Message:remove()

local lolboom = Instance.new("Explosion", button)
lolboom.Position = button.Position
sound:play()

end

button.ClickDetector.MouseClick:connect(resolution)
Report Abuse
megaguy44 is not online. megaguy44
Joined: 28 Sep 2008
Total Posts: 1066
21 Jan 2013 12:02 PM
local button = game.workspace.resolute
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1

function resolution(resolution)

local Message = Instance.new("Message")
Message.text = "3"
wait(1)
Message.text = "2"
wait(1)
Message.text = "1"
wait(1)
Message:remove()

local lolboom = Instance.new("Explosion", button)
lolboom.Position = button.Position
sound:play()

end

button.ClickDetector.MouseClick:connect(resolution)


print('Hello World!')
Report Abuse
OzzyBlox is not online. OzzyBlox
Joined: 04 Nov 2009
Total Posts: 14166
21 Jan 2013 12:04 PM
Uh oh, text is not a valid member of message. Do I capitalize the T?
Report Abuse
megaguy44 is not online. megaguy44
Joined: 28 Sep 2008
Total Posts: 1066
21 Jan 2013 12:05 PM
Yea


print('Hello World!')
Report Abuse
SpamCIean is not online. SpamCIean
Joined: 19 Jan 2013
Total Posts: 6
21 Jan 2013 12:05 PM
Yes you should.
Report Abuse
OzzyBlox is not online. OzzyBlox
Joined: 04 Nov 2009
Total Posts: 14166
21 Jan 2013 12:09 PM
Ok everything works, but the message does not appear on the screen. How do I fix that?
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
21 Jan 2013 12:11 PM
Change this line: Message = Instance.new("Message")
to
Message = Instance.new("Message",game.Workspace)
Report Abuse
huner2 is not online. huner2
Joined: 27 Apr 2008
Total Posts: 1681
21 Jan 2013 12:12 PM
So this:

local button = game.workspace.resolute
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1

function resolution(resolution)

local Message = Instance.new("Message",game.Workspace)
Message.Text = "3"
wait(1)
Message.Text = "2"
wait(1)
Message.Text = "1"
wait(1)
Message:remove()

local lolboom = Instance.new("Explosion", button)
lolboom.Position = button.Position
sound:play()

end

button.ClickDetector.MouseClick:connect(resolution)


print('Hello World!')
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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