#cant require module?
1 messages · Page 1 of 1 (latest)
what does it say when you try to do it
also whats in the module
are you returning it correctly
says nothing
also u mean this right when u say return
nothing when you hover ur mouse over it?
local module = {}
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local tool = script.Parent
local handle = tool:FindFirstChild("Handle")
if not handle then return end
local motor = handle:FindFirstChild("AL")
if not motor or not motor:IsA("Motor6D") then return end
local animating = false
local originalC0 = motor.C0
module.ReloadAnim = function()
-- Rotating around X axis (change to Y or Z if needed for your bow)
local forwardC0 = originalC0 * CFrame.new(-0.75, -1.25, 1) * CFrame.Angles(math.rad(40), math.rad(-40), math.rad(20))
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tween = TweenService:Create(motor, tweenInfo, {C0 = forwardC0})
tween:Play()
tween.Completed:Wait()
game.SoundService.pull:Play()
local forwardC0 = originalC0 * CFrame.new(-0.75, -0.25, 0.5) * CFrame.Angles(math.rad(40), math.rad(-40), math.rad(20))
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tween = TweenService:Create(motor, tweenInfo, {C0 = forwardC0})
tween:Play()
tween.Completed:Wait()
tool.Arrow.Transparency = 0
-- Tween back to original
local tweenBack = TweenService:Create(motor, tweenInfo, {C0 = originalC0})
tweenBack:Play()
tweenBack.Completed:Wait()
animating = false
end
return module
hold on
local module = {}
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local tool = script.Parent
local handle = tool:FindFirstChild("Handle")
if not handle then return end
local motor = handle:FindFirstChild("AL")
if not motor or not motor:IsA("Motor6D") then return end
local animating = false
local originalC0 = motor.C0
module.ReloadAnim = function()
-- Rotating around X axis (change to Y or Z if needed for your bow)
local forwardC0 = originalC0 * CFrame.new(-0.75, -1.25, 1) * CFrame.Angles(math.rad(40), math.rad(-40), math.rad(20))
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tween = TweenService:Create(motor, tweenInfo, {C0 = forwardC0})
tween:Play()
tween.Completed:Wait()
game.SoundService.pull:Play()
local forwardC0 = originalC0 * CFrame.new(-0.75, -0.25, 0.5) * CFrame.Angles(math.rad(40), math.rad(-40), math.rad(20))
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tween = TweenService:Create(motor, tweenInfo, {C0 = forwardC0})
tween:Play()
tween.Completed:Wait()
tool.Arrow.Transparency = 0
-- Tween back to original
local tweenBack = TweenService:Create(motor, tweenInfo, {C0 = originalC0})
tweenBack:Play()
tweenBack.Completed:Wait()
animating = false
end
return module
print("Hello world")
i am tryina clean up some previous written stuff here for when it was a local
i just noticed sum
wait
could it be "animating = false" thats causing it?
idk
