Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my tool get deleted!? Maybe a ROBLOX bug?

Asked by 5 years ago
Edited 5 years ago
local Tool = script.Parent
local Cooldown = false
local CDTime = 10

local Damage = 35



Tool.RemoteEvent.OnServerEvent:Connect(function(Player)

if Cooldown then return end



spawn(function()

Cooldown = true

wait(CDTime)

Cooldown = false

end)



local animationTrack =  Player.Character.Humanoid:LoadAnimation(Tool.Animation)

animationTrack:Play()



Tool.Sound:Play()

local Core = Tool.Core:Clone()

Core.Parent = Player.Character["Right Arm"]

local Weld = Instance.new("Weld",Player.Character["Right Arm"])

Weld.Part0 = Core

Weld.C1 = CFrame.new(0,-1.4,0)

Weld.Part1 = Player.Character["Right Arm"]



end)
0
I don't know if this will help, but try to not use Tool.Core:Clone(). It seems to break things a lot for myself as well. QwertyPython 2 — 5y
0
you don't have to clone just to get Core you just make it to Handle and destroy the current handle you use cherrythetree 130 — 5y

Answer this question