local userInputService = game:GetService("UserInputService")
local lightningService = game:GetService("Lighting")

local animation = lightningService:WaitForChild("Animation")
local idle = animation:WaitForChild("Idle")
local ice1 = Instance.new("Sound")
local ice2 = Instance.new("Sound")


local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local animationTrack = humanoid:LoadAnimation(idle)
local animationPlaying = false

userInputService.InputBegan:Connect(function(Input, Chat)
    if Input.KeyCode == Enum.KeyCode.F and not Chat and humanoid.Health >= 0 then
        if not animationPlaying then
	     player["LeftHand"].Reflectance = 0.5 wait(0.1) player["LeftHand"].Reflectance = 1
	     player["RightHand"].Reflectance = 0.5 wait(0.1) player["RightHand"].Reflectance = 1
            animationTrack:Play()
ice1.SoundId = "http://www.roblox.com/asset/?id=632919727"
            animationPlaying = true
        elseif animationPlaying then
         player["LeftHand"].Reflectance = 0.5 wait(0.1) player["LeftHand"].Reflectance = 0
         player["RightHand"].Reflectance = 0.5 wait(0.1) player["RightHand"].Reflectance = 0
            animationTrack:Stop()
ice2.SoundId = "http://www.roblox.com/asset/?id=632831227"
            animationPlaying = false
        end
    end
end)

as soon as i put the " player["LeftHand"].Reflectance = 0.5 wait(0.1) player["LeftHand"].Reflectance = 1 player["RightHand"].Reflectance = 0.5 wait(0.1) player["RightHand"].Reflectance = 1" the script stoped working

2 comments

0

probably because it's on the same line

0

where should i put it then?