Cyerwyn
|
  |
| Joined: 09 Mar 2013 |
| Total Posts: 3442 |
|
|
| 26 Nov 2016 09:15 PM |
Now this is quite odd. I have a function that works and everything is fine and dandy, but it will randomly fire the second "if" without pressing the r key. Any idea as to why? I switched it from an elseif to just a regular if because the elseif was not working.
=== local player = game.Players.LocalPlayer local character = player.Character if not character or not character.Parent then character = player.CharacterAdded:wait() end local lleg = character:WaitForChild("Left Leg") local larm = character:WaitForChild("Left Arm") local rarm = character:WaitForChild("Right Arm") local rleg = character:WaitForChild("Right Leg") local head = character:WaitForChild("Head") local human = character:WaitForChild("Humanoid") local torso = character:WaitForChild("Torso") local shirt = character:WaitForChild("Shirt") local pants = character:WaitForChild("Pants") local hasteleported = false local isteleporting = false local UserInputService = game:GetService("UserInputService") local parts = {lleg, larm, rarm, rleg, head} local isCyerwyn = "Cyerwyn"
UserInputService.InputBegan:Connect(function(Input,GPE) if not GPE then if Input.KeyCode == Enum.KeyCode.R and isteleporting == false and hasteleported == false then isteleporting = true local fireflygenerator = game.Lighting.fireflygenerator:Clone() fireflygenerator.Parent = character fireflygenerator.Transparency = 1 fireflygenerator.Position = torso.Position - Vector3.new(0, 3.5, 0) human.WalkSpeed = 0 wait(2) shirt.Parent = game.Lighting pants.Parent = game.Lighting head.face.Parent = game.Lighting for i, v in pairs(character:GetChildren()) do if v:IsA("Part") then v.BrickColor = BrickColor.new("Really black") elseif v:IsA("Accessory") then v.Handle.Mesh.TextureId = 0 v.Handle.BrickColor = BrickColor.new("Really black") end end wait(2) human.WalkSpeed= 15 fireflygenerator.FireFlies.Lifetime = NumberRange.new(0, 0) wait(3) fireflygenerator:Destroy() isteleporting = false hasteleported = true end end if Input.KeyCode == Enum.KeyCode.R and isteleporting == false and hasteleported == true then isteleporting = true local fireflygenerator = game.Lighting.fireflygenerator:Clone() fireflygenerator.Parent = character fireflygenerator.Transparency = 1 fireflygenerator.Position = torso.Position - Vector3.new(0, 3.5, 0) human.WalkSpeed = 0 wait(2) game.Lighting.face.Parent = head shirt.Parent = character pants.Parent = character for i, v in pairs(character:GetChildren()) do if v:IsA("Part") then v.BrickColor = BrickColor.new("Pastel brown") elseif v:IsA("Accessory") then v.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=75976712" v.Handle.BrickColor = BrickColor.new("Medium stone grey") end end wait(2) human.WalkSpeed= 15 fireflygenerator.FireFlies.Lifetime = NumberRange.new(0, 0) wait(3) fireflygenerator:Destroy() isteleporting = false hasteleported = false end
end)
=== |
|
|
| Report Abuse |
|
|
Cyerwyn
|
  |
| Joined: 09 Mar 2013 |
| Total Posts: 3442 |
|
| |
|
|
| 26 Nov 2016 09:55 PM |
no one wants to read through all that
|
|
|
| Report Abuse |
|
|
Cyerwyn
|
  |
| Joined: 09 Mar 2013 |
| Total Posts: 3442 |
|
|
| 26 Nov 2016 09:55 PM |
| If it is something obvious, please let me know. Thanks! |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2016 10:03 PM |
How about you let us know so we don't have to read through that?
|
|
|
| Report Abuse |
|
|
Cyerwyn
|
  |
| Joined: 09 Mar 2013 |
| Total Posts: 3442 |
|
|
| 26 Nov 2016 10:23 PM |
| How about you stop being so abrasive and actually be productive? I see you on almost every other forum either insulting the OP or their ideas, while I try to help them even with my limited knowledge. If you don't have something that benefits the person who needs help, please, don't waste your time or theirs by saying it. |
|
|
| Report Abuse |
|
|
|
| 26 Nov 2016 10:43 PM |
It's your script, why don't you be more productive?
|
|
|
| Report Abuse |
|
|