|
| 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 |
|
|
| |
|
|
| 26 Nov 2014 10:45 AM |
| What is in the output? Give more information. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 26 Nov 2014 11:38 AM |
| It's located in a tool in the starterpack. The tool is named "Dark Magic" |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2014 11:51 AM |
| No not the tool. The part you want the light to emit from |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 26 Nov 2014 12:31 PM |
| https://www.youtube.com/watch?v=qSlZ7issKrc |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2014 03:21 PM |
| http://www.roblox.com/Magic-ONLY-STARTER-PACK-item?id=3594944 |
|
|
| Report Abuse |
|
|