Dear Scripters,
I have been having an issue with my code that has been driving me insane and I just don’t know what to do. I’ve been trying to create a Footstep System which is better than previous ones I’ve made however this issue led me to scrapping all of my code
local Materials = {
[Enum.Material.Grass] = "rbxassetid://7003103812",
[Enum.Material.Sand] = "rbxassetid://9126733408",
[Enum.Material.Snow] = "rbxassetid://9126732128",
[Enum.Material.Pavement] = "rbxassetid://2599401908",
[Enum.Material.Pavement] = "rbxassetid://2599401908",
[Enum.Material.WoodPlanks] = "rbxassetid://9126931417"}
--Variables:
local Player = game.Players.LocalPlayer
local Character = Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local RootPart = Character:WaitForChild("HumanoidRootPart")
local Animator = Humanoid:WaitForChild("Animator")
--Main:
print("Hello World!")
The problem here is the print statement. Although to me it seems perfectly fine it isn’t to be seen anywhere in the Output once I play the game. I’ve checked the dev console and it’s practically empty. Honestly it’s driving me insane and if I won’t be able to debug my code in the nearer future my life will be a living hell
Edit: By the way the local script is located in StarterCharacterScripts so idk why the code isn’t working
Why though? The code is just checking that if the character is added then it waits and it fetches the Humanoid or anything inside of the character that is needed.
It pauses the script and continuously waits for the character property to change.
local Character = Player.Character or Player.CharacterAdded:Wait() -- this would check if there is a character, and if there wasn't, it would wait until there is a character
however, this will just wait until there’s a new character, even if there is already a character: