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

How to make a Explosion connect with a player?

Asked by 8 years ago

So I want to know when I create a new instance of a explosion it happens in a particular place instead of just anywhere. In this case I want it to explode a player, I did this but it is not working.

local explosion = Instance.new("Explosion",game.Workspace.Player) explosion.Cframe = Cframe.new(game.Workspace.Player) explosion.Position = game.Workspace explosion.BlastRadius = 4

1 answer

Log in to vote
1
Answered by 8 years ago

The property is called CFrame, with a capital F. Also, for Explosion objects, use Position, not CFrame.

local explosion = Instance.new("Explosion");
explosion.Position = workspace.Player.Head.Position;
explosion.BlastRadius = 4;
explosion.Parent = workspace; --first set the position and the rest of the properties, then move it to workspace
Ad

Answer this question