Hello, I’m currently working on a nuke system, this script clones a mesh, parents it to Workspace then assigns its position. Here in my case, the position won’t be applied, no errors in Output.
function OnClick()
script.Parent.Parent.Parent.Parent.MenuTabs.Enabled = false
local part = game:GetService("ReplicatedStorage").nukes.Nuke:clone()
part.Parent = game.Workspace
part.Position = script.Parent.Parent.Values.Coords.Value
wait(3)
local exp = game:GetService("ReplicatedStorage").nukes.Explosion:Clone()
local exp2 = Instance.new("Explosion")
local sound = part.NukeSound
exp.Parent = part
exp.Position = Vector3.new(script.Parent.Parent.Values.Coords.Value.X, 38.5, script.Parent.Parent.Values.Coords.Value.Z)
sound:Play()
exp2.Parent = exp
exp2.Position = Vector3.new(script.Parent.Parent.Values.Coords.Value.X, 38.5, script.Parent.Parent.Values.Coords.Value.Z)
exp2.BlastPressure = 1
exp2.BlastRadius = 100
exp2.DestroyJointRadiusPercent = 0.65
end
script.Parent.MouseButton1Click:Connect(OnClick)
Here’s a picture of the Explorer:
Does anyone know what I’ve done wrong?