This code is very simple in a server script: i get the players. i get a random player. i get the character. i get the humanoid. BAM. Property “Animator.EvaluationThrottled” is not currently enabled. 7 times.
why?
every step of this stupidly simple code has been about waiting for things to load in because apparently you have to tell it everytime. i cannot find any topic on this that aligns with my situation. does anyone know what is going wrong here
local playerservice = game:GetService("Players")
playerservice.PlayerAdded:Wait() -- this makes the script wait until a player has been added!!!!!
local players = playerservice:GetPlayers()
-- local selectedPlayer = game.Players:GetPlayers()[math.random(1, #game.Players:GetPlayers())]
-- this simply seems to get it from the players folder instead of the service. also works
--print(selectedPlayer)
local RandomPlayer = players[math.random(1, #players)] -- random number between 1 and amount of players
--print(RandomPlayer)
local cattoy = game.ServerStorage.TheCatToy
local mouseplayer = RandomPlayer
local mouseplayerchar = mouseplayer.Character or mouseplayer.CharacterAdded:Wait()
local mouseplayerhum = mouseplayerchar:FindFirstChild("Humanoid")