Search
 
SCRIPT & CODE EXAMPLE
 

LUA

Roblox studio increase variable when holding W

local holding=false
userInputService.InputBegan:Connect(function(input, gameProcessedEvent)
	if input.KeyCode == forward_key then 
		holding = true 
	end
	
	while holding do
			b_gyro.CFrame = CFrame.new(hrp.Position,mouse.Hit.p)
			lv = b_gyro.CFrame.LookVector
			b_velocity.Velocity = Vector3.new(lv.X * speed, lv.Y * speed, lv.Z * speed)
			wait(1)
	end
end)

userInputService.InputEnded:Connect(function(input, gameProcessedEvent)
	holding = false b_velocity.Velocity = Vector3.new(0,0,0)
end)
Comment

PREVIOUS NEXT
Code Example
Lua :: lua coding lines to test with 
Lua :: lua code 
Lua :: C++ 914 card 
Lua :: FiveM how to check where nearest player is store 
Lua :: lua teleport 
Lua :: How to create a part with script in roblox srudio 
Lua :: How to use Humanoids in Roblox Lua 
Matlab :: to detect if a data frame has nan values 
Matlab :: matlab plot vertical line 
Matlab :: matlab negation 
Matlab :: matlab symbolic integration 
Matlab :: what is java_home 
Matlab :: zsh corrupt history file 
Basic :: hello world in basic 
Basic :: script to add value of 2 coulms of grid and show result in 3rd column 
Elixir :: elixir try rescue 
Elixir :: elixir enum all 
Elixir :: elixir function pattern matching 
Scala :: scala function 
Scala :: Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0" 
Actionscript :: octahedron 
Excel :: excel column number 
Perl :: perl add key to hash 
Pascal :: take console input in pascal 
Pascal :: Pascal (gpc 20070904) sample 
Gdscript :: godot make string all lowercase 
Lisp :: list contains lisp 
Assembly :: vba check if shape name exists 
Assembly :: how to custom style material ui 
Javascript :: jquery vslidation remove spaces from input 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =