RealPersaJoin Date: 2012-12-21 Post Count: 7124 |
-- BRICK
BlastPart = Instance.new("Part")
BlastPart.Parent = game.Workspace
BlastPart.FormFactor = "Custom"
BlastPart.Size = Vector3.new(1,1,1)
BlastPart.Transparency = 1
BlastPart.Anchored = true
BlastPart.CanCollide = false
BlastPart.Position = Player.Character.Torso.Position
print("omg why won't this work")
-- MESH
BlastMesh = Instance.new('SpecialMesh', BlastPart)
BlastMesh.MeshId = 'http://www.roblox.com/asset/?id=1080954'
BlastMesh.TextureId = 'http://www.roblox.com/asset/?id=37856148'
-- FLASH
Flash= Instance.new('PointLight', BlastPart)
Flash.Parent = BlastPart
Flash.Enabled = true
Flash.Brightness = 100
Flash.Range = 100
Flash.Color = Color3.new (255/255, 170/255, 0/255)
-- EXPLOSION
Explosion = Instance.new('Explosion', BlastPart)
Explosion.BlastPressure = 0
Explosion.BlastRadius = 0
Explosion.Position = Player.Character.Torso.Position
It doesn't seem to do any of that, but there are no script errors. I even put in a print, which comes out on the output, even though it doesn't do any of the functions. I don't see any brick being made in the Workspace, or any lights or explosions following it.
~ !دست از سرم بردار ~ مانند یک گانگستر واقعی ~ |
|
RealPersaJoin Date: 2012-12-21 Post Count: 7124 |
Oh, and what it's supposed to do is create a part and put a mesh, explosion, and pointlight into it and put it where the torso is when you click a GUI button. It does some other things after that, but I didn't include it because those things work.
~ !دست از سرم بردار ~ مانند یک گانگستر واقعی ~ |
|
RealPersaJoin Date: 2012-12-21 Post Count: 7124 |
b
~ !دست از سرم بردار ~ مانند یک گانگستر واقعی ~ |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
try making it... visible first? |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
BlastPart.Transparency = 1;
change to
BlastPart.Transparency = 0; |
|
RealPersaJoin Date: 2012-12-21 Post Count: 7124 |
The brick doesn't even appear in the explorer
~ !دست از سرم بردار ~ مانند یک گانگستر واقعی ~ |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
can I see the GUI code? |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
I don't see any definitions of Player.
Explosion.Position = Player.Character.Torso.Position
Please post the full script. |
|
truman89Join Date: 2008-05-18 Post Count: 531 |
First of all, you need to have a function. Second, you need a way of calling that function. For the sake of simplicity, I'll demonstrate with the Touched event.
function onTouch()
-- BRICK
BlastPart = Instance.new("Part")
BlastPart.Parent = game.Workspace
BlastPart.FormFactor = "Custom"
BlastPart.Size = Vector3.new(1,1,1)
BlastPart.Transparency = 1
BlastPart.Anchored = true
BlastPart.CanCollide = false
BlastPart.Position = Player.Character.Torso.Position
print("omg why won't this work")
-- MESH
BlastMesh = Instance.new('SpecialMesh', BlastPart)
BlastMesh.MeshId = 'http://www.roblox.com/asset/?id=1080954'
BlastMesh.TextureId = 'http://www.roblox.com/asset/?id=37856148'
-- FLASH
Flash= Instance.new('PointLight', BlastPart)
Flash.Parent = BlastPart
Flash.Enabled = true
Flash.Brightness = 100
Flash.Range = 100
Flash.Color = Color3.new (255/255, 170/255, 0/255)
-- EXPLOSION
Explosion = Instance.new('Explosion', BlastPart)
Explosion.BlastPressure = 0
Explosion.BlastRadius = 0
Explosion.Position = Player.Character.Torso.Position
end
game.Workspace.ExamplePart.Touched:connect(onTouch)
When you touch the brick ExamplePart, you'll get results. Just make sure you put a part in the game and name it ExamplePart. |
|
truman89Join Date: 2008-05-18 Post Count: 531 |
And also do what KEV said. You need to define the player as well. |
|
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
|
|
RealPersaJoin Date: 2012-12-21 Post Count: 7124 |
It's not any of that. I already said that this wasn't the entire script, I already have a way of calling it. The problem was that I had it delete the brick immediately after it made it, so I just put a wait in it and it works now.
~ !دست از سرم بردار ~ مانند یک گانگستر واقعی ~ |
|
KEVEKEV77Join Date: 2009-03-12 Post Count: 6961 |
You NEVER said that this wasnt the whole script.
Plus I got mine to work too. |
|
RealPersaJoin Date: 2012-12-21 Post Count: 7124 |
"It does some other things after that, but I didn't include it because those things work."
~ !دست از سرم بردار ~ مانند یک گانگستر واقعی ~ |
|