There seems to have been something wrong with the new game I created to develop the knife in, I have no idea if it was a ROBLOX problem or not as the game had never been edited in before.
I am working on a knife for my upcoming game, however, the local script does not function at all, as if it didn’t exist within the tool.
To test if the script was working I added print("whatever was going on at this part in the script")
even on the very first line, but nothing shows up in the output, whether or not the tool is equipped.
The script is not disabled and no other scripts are disabling it as I have created a separate empty base-plate just to create this weapon.
Any help on how to solve this would be wonderful. I have attached the script itself and screenshots of the tool’s and handle’s properties.
Local Script
print("Working")
wait()
print("About to start")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character
print("1: Got Player and Character")
repeat wait() until Character ~= nil or Player.CharacterAdded:Wait() or
game.Workspace:FindFirstChild(Player.Name)
print("2: Found Character")
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local PlayingAnimation = nil
print("3: Got the Tool")
local Activated = false
local Equipped = false
local CanUse = false
print("4: Set Tool Values")
local StartTick = tick()
local ActiveTick = tick()
local Mouse = Player:GetMouse()
print("5: Got Mouse")
local Animations = {
Charge = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Charge")),
Duration = 1.5
},
ChargeHold = {
Animation =
Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("ChargeHold"))
},
Slash1 = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Slash1")),
Duration = 0.6
},
Slash2 = {
Animation = Character.Humanoid:LoadAnimation(script.Parent:WaitForChild("Slash2")),
Duration = 0.6
}
}
print("6: Created Animations Table")
Tool.Equipped:Connect(function()
print("Equipped Started")
Equipped = true
CanUse = true
print("Equipped Complete")
end)
Screen Shots
Tool Contents in StarterPack
Tool Properties
Tool Handle Properties
I have tried disabling and re-enabling different things, and still no function form the script.