player = game.Players.LocalPlayer
char = player.Character
hum = char:WaitForChild("Humanoid")
script.Parent.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
local h = Instance.new("Part")
h.Name = player.Name
h.Size = Vector3.new(23,23,23)
h.Position = char.Torso.Position
h.TopSurface = "Smooth"
h.BrickColor = BrickColor.new("Bright yellow")
h.Shape = "Ball"
h.CanCollide = false
h.Transparency = .5
h.Anchored = true
h.Parent = game.Workspace--]]
local mouse = player:GetMouse()
local mousedown = false
local Event
mouse.Button1Up:connect(function()
local s = game.ReplicatedStorage.healhit:Clone()
s.Parent = h
h.Position = char.Torso.Position
char.Torso.Anchored = false
mousedown = false
game:GetService("Debris"):AddItem(h,1)
Event:disconnect()
end)
Event = mouse.Button1Down:connect(function()
h.Position = char.Torso.Position
char.Torso.Anchored = true
mousedown = true
while mousedown do
wait()
h.Size = h.Size + Vector3.new(.1, .1, .1)
end
end)
end)
end)
basically, this makes a ball expand around my character, but when a script gets inserted into this ball, it goes ontop of my head, even though its anchored and cancollide is false. if i take out the script cloning part, it works just fine, but i need that script inside of the part. i found out that if i put the entire script inside a comment, it works fine, so i think the problem is that i use a .touched function for the script. so what do i do to stop it from popping onto my head?

1 comment
didn't work, the CFrame didn't help