Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How Can I Make Taser Work? [Working]

Asked by 9 years ago

I tried to make taser but I failed 6 times. I really need your help. If you script weapons then this would be easy for you. I want to script taser that will make others platformstanding when clicked on them. Not shooting but just clicking body part then searching for humanoid and make platformstanding to true. What I did is this:

local tool = script.Parent
tool.Equipped:connect(function(mouse)
if mouse then
mouse.Button1Down:connect(function()
--Help right here!
end)
end
end)

Now I am thinking: Will it work if it will clone ball from server storage to selected position and then when ball will touch something it will be removed and find humanoid in hit.Parent? And using

local xlscln = game.ServerStorage.TaserBullet:clone()
xlscln.Parent = game.Workspace
xlscln.Position = mouse.hit.p

Yeah that's all I think?

1 answer

Log in to vote
1
Answered by 9 years ago

Just do it with mouse.Target

0
Raycasting would also work. http://wiki.roblox.com/index.php?title=How_to_Make_a_Raycasting_Lasergun there is not need to make the ray visible. Perci1 4988 — 9y
Ad

Answer this question