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 » Game Design
Home Search
 

Re: Need help with a script

Previous Thread :: Next Thread 
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 10:20 AM
local PelletLight = Instance.new("PointLight", "Part")
PelletLight.Color = Color3.new(1, 0, 1)
Pellet.Locked = true
Pellet.BackSurface = 0
Pellet.BottomSurface = 0
Pellet.FrontSurface = 0
Pellet.LeftSurface = 0
Pellet.RightSurface = 0
Pellet.TopSurface = 0
Pellet.Shape = 0
Pellet.Size = Vector3.new(math.random(0.1,2),math.random(0.1,2),math.random(0.1,2))
Pellet.BrickColor = BrickColor.new(104)
script.Parent.PelletScript:clone().Parent = Pellet


How do I fix this?
Report Abuse
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 10:44 AM
b1
Report Abuse
Altlightpower26 is not online. Altlightpower26
Joined: 28 Oct 2014
Total Posts: 37
26 Nov 2014 10:45 AM
What is in the output? Give more information.
Report Abuse
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 10:51 AM
Players.Player.Backpack.Dark Magic.Slingshot:5: bad argument #2 to 'new' (Object expected, got string)

local Pellet = Instance.new("Part")
local PelletLight = Instance.new("PointLight", "Part")
PelletLight.Color = Color3.new(1, 0, 1)
Pellet.Locked = true
Pellet.BackSurface = 0
Pellet.BottomSurface = 0
Pellet.FrontSurface = 0
Pellet.LeftSurface = 0
Pellet.RightSurface = 0
Pellet.TopSurface = 0
Pellet.Shape = 0
Pellet.Size = Vector3.new(math.random(0.1,2),math.random(0.1,2),math.random(0.1,2))
Pellet.BrickColor = BrickColor.new(104)
script.Parent.PelletScript:clone().Parent = Pellet

I'm trying to make dynamic lighting stick with the pellet.
Report Abuse
Altlightpower26 is not online. Altlightpower26
Joined: 28 Oct 2014
Total Posts: 37
26 Nov 2014 11:23 AM
local PelletLight = Instance.new("PointLight", "Part") Where it says "Part" replace with something like game.Workspace.Part or script.Parent.Part or wherever it is
Report Abuse
Altlightpower26 is not online. Altlightpower26
Joined: 28 Oct 2014
Total Posts: 37
26 Nov 2014 11:23 AM
You are telling the script to place the light inside a string, not a part. So it gets confused and spits out an error
Report Abuse
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 11:38 AM
It's located in a tool in the starterpack. The tool is named "Dark Magic"
Report Abuse
Altlightpower26 is not online. Altlightpower26
Joined: 28 Oct 2014
Total Posts: 37
26 Nov 2014 11:51 AM
No not the tool. The part you want the light to emit from
Report Abuse
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 11:55 AM
The original script looks like this (btw)



local Pellet = Instance.new("Part")
Pellet.Locked = true
Pellet.BackSurface = 0
Pellet.BottomSurface = 0
Pellet.FrontSurface = 0
Pellet.LeftSurface = 0
Pellet.RightSurface = 0
Pellet.TopSurface = 0
Pellet.Shape = 0
Pellet.Size = Vector3.new(math.random(0.1,2),math.random(0.1,2),math.random(0.1,2))
Pellet.BrickColor = BrickColor.new(104)
script.Parent.PelletScript:clone().Parent = Pellet

so I should do ("game.Workspace.Part")?
Report Abuse
Altlightpower26 is not online. Altlightpower26
Joined: 28 Oct 2014
Total Posts: 37
26 Nov 2014 12:21 PM
Learn basics. go to wiki.roblox.com. It'll help. Because an object value is NOT inside a string. (A string is quotes) Tell me WHERE the part that you want to emit from is. If it is a part being created then use the variable that you used to create the part. Otherwise you could give me the entire tool through a model and I'll give it back with the fixed script
Report Abuse
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 12:31 PM
https://www.youtube.com/watch?v=qSlZ7issKrc
Report Abuse
TheBluePickles is not online. TheBluePickles
Joined: 16 Aug 2014
Total Posts: 2942
26 Nov 2014 03:21 PM
http://www.roblox.com/Magic-ONLY-STARTER-PACK-item?id=3594944
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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