How to make a tool detect if it hit a player (or sum like that)

yeahhhhhh sureeeee (bro the 30 text thigny is so annoying)

3 Likes

i sent you a friend request. (oao

4 Likes

I guess I’ll find out if my code works or not.

5 Likes

are you going to add me ? (oogaoooogaoo)

3 Likes

The code should also be run in a serverscript. Instead of getting the players mouse, you would use the .Activated event. You can also fire a remote event that runs the code. This way the changes will actually be visible to everyone in the server.

3 Likes

ooooooh okay, ill try that later.

3 Likes

i added you to the project… (cool)

3 Likes

I added you. Can you join a game…

3 Likes

uhhhh sure i guess, why tho???

3 Likes

So you can test your damage tool on me?

2 Likes

ooooooh, i thought you meant a random game. okay let me just publish the project real quick.

1 Like

okay join me now. (bro i hate the 30 text thingy)

1 Like

wait i gotta fix 1 glitch i found in the game.

1 Like

local tool = script.Parent

local mouse = game.Players.LocalPlayer:GetMouse()
local Fist1 = tool.Fist1 --Indexing Handle/Fist1
local Fist2 = tool.Fist2 --Indexing Fist2
tool.Equipped:Connect(function()
mouse.Button1Down:Connect(function()
task.wait(5)

	while task.wait(0.05) do
		for _,character in pairs(workspace:GetChildren()) do
			if (character.HumanoidRootPart.CFrame.Position.Tool.Handle.CFrame.Position).Magnitude <= 3 then
				character.Humanoid:TakeDamage(1)
			end
		end
	end
end)

end)

local Fist1 = tool.Fist1

tool.Fist1 should be tool.Handle since the handle is fist1

I’ll let you guys figure it out.

1 Like

Accept my friend request @Mob1leN0OB

i just dont understand. the thingy keeps saying that fist1 isnt a valid member of “fists” when it literally is.

"Fist1 is not a valid member of Tool “Players.Mob1leN0OB.Backpack.Fists”

1 Like

this is just a waste of good memory hes better off using raycasting or shapecasting if he xants to

1 Like

Can we stop using this forum like regular Roblox chat?
Make your points clear.

1 Like