generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: It's in a LocalScript. HELP?

Previous Thread :: Next Thread 
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
04 Jun 2016 09:57 PM
local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(Key,GPE)
if Key.KeyCode == Enum.KeyCode.W and not GPE then
local Player = hit.Parent:findFirstChild("Humanoid")
local Player = game.Players.LocalPlayer.WalkSpeed = 100
end
end)

I'm looking to disable WASD Keys and leave Arrows keys and Space Bar in my game.
Yeah, what did I do wrong here? Speed still goes at 16 and not 0
The error I mainly see that I cannot figure out is: Expected Identifier, got '='

What did I do wrong?
Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
04 Jun 2016 10:00 PM
local Player = game.Players.LocalPlayer.WalkSpeed = 100

Really? You can't set the variable and the value at the same time.
Report Abuse
iiSquare is not online. iiSquare
Joined: 01 Apr 2012
Total Posts: 390
04 Jun 2016 10:01 PM
local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(Key,GPE)
if Key.KeyCode == Enum.KeyCode.W and not GPE then
local Player = hit.Parent:findFirstChild("Humanoid")
local Player = game.Players.LocalPlayer.WalkSpeed == 100
end
end)


Report Abuse
Immersible is not online. Immersible
Joined: 14 Aug 2015
Total Posts: 432
04 Jun 2016 10:01 PM
Also, it's

Player = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 100


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
04 Jun 2016 10:01 PM
iiSquare is wrong as well.
Report Abuse
Immersible is not online. Immersible
Joined: 14 Aug 2015
Total Posts: 432
04 Jun 2016 10:02 PM
Nvm at my last post I was too stupid to check my whole line of code
local player = game.Players.LocalPlayer
Player.Character.Humanoid.WalkSpeed = 100


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
04 Jun 2016 10:02 PM
so is immersible
Report Abuse
Immersible is not online. Immersible
Joined: 14 Aug 2015
Total Posts: 432
04 Jun 2016 10:03 PM
There

local Player = game.Players.LocalPlayer
Player.Character.Humanoid.WalkSpeed = 100


Report Abuse
TheCoderOfLua is not online. TheCoderOfLua
Joined: 12 Apr 2016
Total Posts: 1599
04 Jun 2016 10:04 PM
lol u forgot to capitalize P
Report Abuse
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
04 Jun 2016 10:14 PM
I'm learning how to bind keys and do this, thanks for helping guys, I really appreciate this so much
Report Abuse
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
04 Jun 2016 10:35 PM
your L.U.A is wrong


Report Abuse
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
04 Jun 2016 10:39 PM
WEIRD

local UIS = game:GetService("UserInputService")
UIS.InputBegan:connect(function(Key,GPE)
if Key.KeyCode == Enum.KeyCode.W and not GPE then
local Player = game.Players.LocalPlayer
Player.Character.Humanoid.WalkSpeed = 0
end
end)

it disabled ALL OF THE KEYS that move the character
and I want to set walkspeed to zero
I only want to disable WASD
NOT the arrow keys
Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
04 Jun 2016 10:43 PM
Because you don't reset the walkspeed back to 16 when an arrow key is pressed i assume.
Report Abuse
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
04 Jun 2016 10:44 PM
How do I do that?
Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
04 Jun 2016 10:47 PM
Do the same thing except for all arrow keys, except set the walkspeed back.
Report Abuse
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
04 Jun 2016 10:48 PM
oh
wait a minute...
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
05 Jun 2016 12:42 AM
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:wait()
local human = char.humanoid

uis.InputBegan:connect(function(input,event)
if event then return end
if input.KeyCode == Enum.KeyCode.W then
human.WalkSpeed = 100
end
end)


Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
05 Jun 2016 12:44 AM
johny220 what does L.U.A stand for?


Report Abuse
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
05 Jun 2016 09:52 AM
idk that is the coder language roblox uses.


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
05 Jun 2016 10:08 AM
roblox uses Lua
Report Abuse
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
05 Jun 2016 10:48 AM
"your L.U.A is wrong"
> doesn't know what L.U.A means

learn before you try and roast people
Report Abuse
johny220 is not online. johny220
Joined: 30 Oct 2011
Total Posts: 4584
05 Jun 2016 11:03 AM
it was a joke idiot


Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
05 Jun 2016 11:15 AM
all of you are so bad at L.U.A. like seriously


Report Abuse
Jiquor is not online. Jiquor
Joined: 02 Jun 2008
Total Posts: 10249
05 Jun 2016 03:04 PM
you're stupid narwhal hat is worse :b

but i solved it, I rewrote the script with someone
Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37142
05 Jun 2016 04:00 PM
go back to trading xd
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image