|
| 07 Jul 2015 10:40 PM |
so im trying to make a sprint system and i keep getting this 22:37:47.033 - Players.Player1.PlayerGui.Energy.Sprint:10: bad argument #2 to '?' (UDim2 expected, got boolean)
local amount = script.Parent.Amount
game:GetService("UserInputService").InputBegan:connect(function(Input, gameProcessedEvent) --gameProcessedEvent tells whether you are chatting or not while Input.KeyCode == Enum.KeyCode.LeftShift do -- amount.Size ~= UDim2.new(0,0,0.04,0) workspace.Panting:Play() game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 32 wait(.1) amount.Size = amount.Size - amount:TweenSize(UDim2.new(amount.Size.X.Scale - .02,0,.04,0),"InOut","Quad",.1,true,nil) wait(.1) if amount.Size == UDim2.new(0,0,0.04,0)then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 end if game:GetService("UserInputService").InputEnded then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 end end end)
<3 cats <3 |
|
|
| Report Abuse |
|
| |