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

How to Make an Automatic Gun Using ROBLOX's RayCasting Script?

Asked by 7 years ago
Edited 7 years ago

Guys, I am so sorry... this is such a simple question but I do not know. I think it has something to do with loops. I am not sure. I am using ROBLOX's RayCasting Script. I don't need a super long answer or anything, just something to point me in the right direction. Thank you! -TheFierceWaffle

1 answer

Log in to vote
0
Answered by 7 years ago

Well you can just do Button1Down etc like so

01local player = game.Players.LocalPlayer
02local mouse = player:GetMouse()
03 
04local mouseDown = false
05local canPlay = true
06 
07mouse.Button1Down:Connect(function()
08    mouseDown = true
09end)
10 
11mouse.Button1Up:Connect(function()
12    mouseDown = false
13end)
14 
15while true do
View all 24 lines...

Hope it helped :D If it helped please mark it as answered

0
no wait EliteMackan 0 — 6y
0
what? DumbKickButt5588 167 — 6y
Ad

Answer this question