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
Well you can just do Button1Down etc like so
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local mouseDown = false local canPlay = true mouse.Button1Down:Connect(function() mouseDown = true end) mouse.Button1Up:Connect(function() mouseDown = false end) while true do if mouseDown then if canPlay then canPlay = false --Put your code stuff here canPlay = true end end end
Hope it helped :D If it helped please mark it as answered