Hi, I’m currently working on a taser tool and I want to use the Mouse.Target statement to allow the person to click on the player from a distance.
But I also want it to attach ‘prongs’ to a player. I want them to be connected from the taser and the person but I want it to move with them (so it’s not rigid) but I’m not sure how.
Then it gets a bit more complex,
You need to know how to use client-server model for this
Basically you will make 2 scripts that one of them handles the mouse target and the other to make the connection
Here’s a simple script to do those things, assuming you already have a ropeconstraint setup…
local DISTANCE_OFFSET = 0.5
local TargetPart, Player
while wait() do
RopeConstraint.Length = (TargetPart.Position-Player.Character.PrimaryPart.Position).Magnitude + DISTANCE_OFFSET
end
If so here is the place that has the tool Taser Tool.rbxl (20.3 KB)
Unfortunately i am using “Beam” Instance in my case so there is no way to prevent the “wires” to go underground UNLESS you set the offset to < 1.2 (Currently it is 1.5 or something)