hello. i have this bug when i equip flashlight this white circle wont disapear
i need help how to fix this
how can i fix this?
hello. i have this bug when i equip flashlight this white circle wont disapear
i need help how to fix this
how can i fix this?
With you not providing ANY code and nothing but an image how do you expect anyone to help?
local l__RunService__1 = game:GetService("RunService");
local l__LocalPlayer__2 = game:GetService("Players").LocalPlayer;
local v3 = l__LocalPlayer__2.Character or l__LocalPlayer__2.CharacterAdded:Wait();
local l__Head__4 = v3:WaitForChild("Head");
local l__HumanoidRootPart__5 = v3:WaitForChild("HumanoidRootPart");
local v6 = game.ReplicatedStorage.flashlight:Clone();
v6.Parent = v3.Head
local v7 = CFrame.new(0, 0, -2)
local v8 = Vector3.new()
local l__ring__9 = v6:WaitForChild("ring")
local l__mouse__10 = game.Players.LocalPlayer:GetMouse()
function tween(p1, p2, p3)
p1 = p1 + (p2 - p1) * p3
return p1
end
local equip_Fpart = game.ReplicatedStorage.flashlight_remote.flashlight_equip
local destroy_Fpart = game.ReplicatedStorage.flashlight_remote.flashlight_destory
local char = l__LocalPlayer__2.Character
local humanoid = char:FindFirstChild("Humanoid")
local r6 = Instance.new("Animation")
r6.AnimationId = "rbxassetid://14705120428" --- your hold anim here (r6)
local r15 = Instance.new("Animation")
r15.AnimationId = "rbxassetid://14701671279" --- your hold anim here (r15)
local r6_anim = humanoid:LoadAnimation(r6)
local r15_anim = humanoid:LoadAnimation(r15)
--- see if it mobile, if on mobile then the mobile button is visible ---
if game:GetService("UserInputService").TouchEnabled then
local button = script.Parent.mobile_flashlight
if button then
button.Frame.Visible = true
end
end
game:GetService("UserInputService").InputBegan:connect(function(p4)
local l__KeyCode__11 = p4.KeyCode
if l__KeyCode__11 == Enum.KeyCode.F or l__KeyCode__11 == Enum.KeyCode.ButtonR3 then
if script.flashlight.Value ~= false then
script.flashlight.Value = false;
return
end
else
return
end
script.flashlight.Value = true
end)
script.flashlight:GetPropertyChangedSignal("Value"):Connect(function()
v6.fpart.snd:Play()
if script.flashlight.Value == true then
v6.outer.outer.Enabled = true
v6.fpart.inner.Enabled = true
equip_Fpart:FireServer()
--game.ReplicatedStorage.flashlight_remote.plr_name.Name = l__LocalPlayer__2.Name
if char:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R6 then
r6_anim:Play()
elseif char:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R15 then
r15_anim:Play()
end
return
end
destroy_Fpart:FireServer()
r6_anim:Stop()
r15_anim:Stop()
v6.outer.outer.Enabled = false
v6.fpart.inner.Enabled = false
end)
local v12 = CFrame.new(0, 0, -1)
local l__CurrentCamera__1 = game.Workspace.CurrentCamera
local u2 = 0
local u3 = 0
local u4 = 0
local u5 = 0
local u6 = 0
local u7 = 0
local u8 = l__Head__4.Position.Y - l__HumanoidRootPart__5.Position.Y
l__RunService__1.RenderStepped:Connect(function()
l__ring__9.LocalTransparencyModifier = 1
if script.flashlight.Value then
l__ring__9.LocalTransparencyModifier = -math.huge
local l__LookVector__13 = l__CurrentCamera__1.CFrame.LookVector
u2 = l__LookVector__13.x
u3 = l__LookVector__13.y
u4 = l__LookVector__13.z
u5 = tween(u5, u2, 0.25)
u6 = tween(u6, u3, 0.25)
u7 = tween(u7, u4, 0.25)
end;
if v3:FindFirstChild("Humanoid"):GetState() ~= Enum.HumanoidStateType.Dead then
if not script.flashlight.Value then
return
end
else
v6.fpart.CFrame = l__Head__4.CFrame * CFrame.new(0, 0, -2);
return
end
v6.fpart.CFrame = CFrame.new(l__HumanoidRootPart__5.CFrame.p, l__HumanoidRootPart__5.CFrame.p + Vector3.new(u5, u6, u7)) * CFrame.Angles(-0, 0, 2) + Vector3.new(0, u8, 0);
end)