Basically what happens is I try to clone a tool from ReplicatedStorage using this script
local ServerStorage = game:GetService("ReplicatedStorage") local tool = ServerStorage:FindFirstChild("Cigaratte") local player = game:GetService("Players").LocalPlayer local cloned = false script.Parent.Activated:Connect(function() if not cloned then cloned = true tool:Clone().Parent = player.Backpack end wait(5) cloned = false end)
Once I have cloned this tool it shows up in my inventory and I can select it and hold it, however any animations/Interactions and my activated function doesn't work, basically everything in this script
local player = game:GetService("Players").LocalPlayer local Character = player.CharacterAdded:wait() or player.Character local Humanoid1 = Character:WaitForChild("Humanoid") local smk = script.Smoking local LoadAnimation1 = Humanoid1:LoadAnimation(smk) local IsSmoking = false local Cigaratte = script.Parent.Part local TweenService = game:GetService("TweenService") local tweenInfo = TweenInfo.new( 30, -- Time Enum.EasingStyle.Linear, -- EasingStyle Enum.EasingDirection.Out, -- EasingDirection 0, -- RepeatCount (when less than zero the tween will loop indefinitely) false, -- Reverses (tween will reverse once reaching it's goal) 0 -- DelayTime ) local tween = TweenService:Create(Cigaratte, tweenInfo, {Size = Vector3.new(0.45, 0.086, 0.086)}) script.Parent.Activated:Connect(function() LoadAnimation1:Play() IsSmoking = true wait(1) tween:Play() end) script.Parent.Deactivated:Connect(function() LoadAnimation1:stop() IsSmoking = false tween:Cancel() end)
Both scripts are local scripts, I also have an Animation whose parent is the script above.
Make sure this is in StarterPlayerScript
Script:
local ServerStorage = game:GetService("ReplicatedStorage") local tool = ServerStorage:FindFirstChild("Cigaratte") local player = game:GetService("Players").LocalPlayer local cloned = false script.Parent.Activated:Connect(function() tool:Clone().Parent = player.Backpack if cloned then if tool.Activated then end wait(5) cloned = false end)