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
 

Script has no errors, but wont work?

Previous Thread :: Next Thread 
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
15 Apr 2016 09:04 PM
local monster = game.Lighting.MonstersFolder.o
local monsterscanspawn = 15
local clickDetector = Instance.new("ClickDetector", script.Parent)



function onClicked()
local i = monster:Clone().Name == "l"
if monsterscanspawn == 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 then
game.Lighting.MonstersFolder.l.Parent = game.Workspace
monsterscanspawn = monsterscanspawn -1
elseif monsterscanspawn == 0 then
if game.Workspace:FindFirstChild('l') then
game.Workspace.l:remove()
end
end
end

clickDetector.MouseClick:connect(onClicked)

Nothing in the output, please help?

tim cipul
Report Abuse
2ndaccountfnadds5142 is not online. 2ndaccountfnadds5142
Joined: 20 Mar 2013
Total Posts: 119
15 Apr 2016 09:11 PM
You could try putting an actual clickdetector, rather than making a new instance. Usually connecting is broken when there are no errors in the dev console.
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
15 Apr 2016 09:13 PM
Oops, that was a mistake, forgot to remove that lol, but ill c if it works

tim cipul
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
15 Apr 2016 09:14 PM
nope, still wont work

tim cipul
Report Abuse
2ndaccountfnadds5142 is not online. 2ndaccountfnadds5142
Joined: 20 Mar 2013
Total Posts: 119
16 Apr 2016 04:30 AM
Does it say anything in the dev console?
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
16 Apr 2016 05:43 AM
Nope.

tim cipul
Report Abuse
mario118118 is not online. mario118118
Joined: 05 Jul 2012
Total Posts: 245
16 Apr 2016 05:55 AM
if monsterscanspawn == 1 or monstercanspawn == 2 or monstercanspawn == 3 etc then? Idk
Report Abuse
DevObject is not online. DevObject
Joined: 28 Jul 2011
Total Posts: 7048
16 Apr 2016 06:26 AM
Try cutting and pasting it sometimes that helps. (The script not the code inside the script)
Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
16 Apr 2016 06:57 AM
local monster = game.Lighting.MonstersFolder.o
local monsterscanspawn = 15
local clickdetector = script.Parent



function clicked()
local i = monster:Clone().Name == "l"
if monsterscanspawn == <=15 then
game.Lighting.MonstersFolder.l.Parent = game.Workspace
monsterscanspawn = monsterscanspawn -1
elseif monsterscanspawn == 0 then
if game.Workspace:FindFirstChild('l') then
game.Workspace.l:remove()
end
end
end

clickdetector.MouseClick:connect(onClicked)

note I haven't tested this so it's probably bad


local robux = R$5,506 local tickets = Tx0 local rap = 101
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