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
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