make new instance from tool not damage player wielding it?
ok, so I have a tool that makes an instance spawn.
the new instance has a code which then damages all players who touch it.
but that's the problem, since it spawns at the position of the player...
I think you get the point.
01 | local tool = script.Parent |
06 | tool.Equipped:Connect( function (m) |
10 | tool.Activated:Connect( function () |
12 | local Part = Instance.new( "Part" ,workspace) |
13 | Part.Position = script.parent.Handle.Position |
14 | Part.Material = Enum.Material.Neon |
15 | Part.Size = Vector 3. new( 0.5 , 0.5 , 0.5 ) |
16 | Part.CanCollide = false |
19 | Part.Touched:Connect( function (hit) |
20 | local h = hit.Parent:FindFirstChild( "Humanoid" ) |
I know I've been asking a lot of questions here but I just cant find the answer...
it would also be appreciated if you could put the link to teach me about this kind of stuff. like in here: https://developer.roblox.com