Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i add a red pointlight to this projectile and make it's material neon?

function fire(v)
	for i = 1,1 do
		script.Parent.Handle.Fire:play()
		script.Parent.Ammo.Value = script.Parent.Ammo.Value - 1
		updateAmmo()
		local dir = v - script.Parent["Handle"].Position
		dir = computeDirection(dir)
		local pos = script.Parent["Handle"].Position + (dir * 8)
		local p = Instance.new("Part")
		p.Name = "Projectile"
		p.CFrame = CFrame.new(pos, pos + dir)
		p.BrickColor = BrickColor.new(21)
		p.Reflectance = 0.1
		p.Velocity = (script.Parent.Parent["Head"].Position - v).unit * -150 
		p.Size = Vector3.new(1, 1, 1)
		p.formFactor = 2
		local mesh = script.Parent.Mesh:clone()
		mesh.Parent = p
		local upforce = Instance.new("BodyForce")
		upforce.force = Vector3.new(0, p:GetMass() * 196, 0)
		upforce.Parent = p
		local s = script.Parent["ProjectileScript"]:Clone()
		s.Disabled = false
		s.Parent = p
		p.Parent = game.Workspace
		wait(0)
	end
end

1 answer

✓ Accepted answer
local PointLight = Instance.new("PointLight",p) -- Make the light...
PointLight.Color = Color3.new(1, 0, 0) -- Make it red

p.Material = Enum.Material.Neon -- Make the material neon

1 comment

0

Thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.