Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I Get this to Work?

Asked by 10 years ago

My Script wont work!

print("Deathstar Explosion Loaded")

CORE = script.Parent

function onTouched(part)
    if hit.Name == "ProtonLaser" then
    hit.Remove()
    explosion = Instance.new("Explosion")
    explosion.BlastRadius = 30
    explosion.BlastPressure = 100000000
    explosion.Position = script.Parent.Position
    explosion.Parent = game.Workspace
    connection:disconnect()
end end

connection = CORE.Touched:connect(onTouched)

I Want the Brick to blow up when hit by a Proton Laser but its not working why wont it Work? Please Help!

Answer this question