Hey there,
This is my first post, please be gentle
I'm a somewhat moderate scripter trying to make a simple knife script. I've been working on the local script first. In play solo it works fine, but when I hit run I get an error!
Humanoid is not a valid member of Model
Here is the script:
-- Made by Chardinok no steal por favor -- Variables local tool = script.Parent local plr = game:GetService("Players").LocalPlayer local chr = plr.Character or plr.CharacterAdded:wait() local hum = chr.Humanoid print(hum) local animating = false -- Animations local stabanim = Instance.new("Animation") stabanim.AnimationId = "rbxassetid://2306972447" tool.Activated:connect(function() if animating == false then animating = true local stabtrack = hum:LoadAnimation(stabanim) stabtrack:Play() wait(0.5) stabtrack:Stop() animating = false end end)
I appreciate every response.
Thanks to pojoto I've figured it out!
Instead of local hum = chr.Character, I used local hum = chr:WaitForChild("Humanoid"), and surprisingly, it worked!
Thanks to everyone that helped!