Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I script a gun, then a target?

Currently i am attempting to make a Aim-training gun range where depending where you shoot the gun you get a accuracy check.

Im not sure how to make this work though, i mean i could make the target have 5 seperate layers surrounding it, that is affected by heath damage, then when its hit it sets off a timer untill the next target is hit, in which case id have to add a value to act as a timer so like

If workspace.body.torso.touched:connect (function(targethit) then
Do if workspace.body.torso2.touched:connect == true then end
Else
Timer=timer + 10

But im not sure how to make a gun that would work with it.

How do i even make a gun?

Assistance would be great!

1 answer

My browser won't let me comment but let's pretend this is a comment:

First, you can not have ifcapitalized. Second, do is not needed for the second line of the script and shall not be capitalized. Third, end is not something that can end the script entirely. Meaning if you want it to shut down the script, use script.Disabled = true Fourth, >else should not be capitalized And the 4th line is upright confusing. You need to define the Variable Time After doing so, let me know and then I can see where your problem is because I'm downright confused.

This discussion is preserved as it was. New answers, comments, and votes are closed.