#How would I go about getting a variable of 'Character' or 'Humanoid' in a server script?

3 messages · Page 1 of 1 (latest)

ornate thunder
#

there's a few ways. a playeradded event: lua game.Players.PlayerAdded:Connect(function(player) local Character = player.Character or player.CharacterAdded:Wait() end) a script in startercharacterscripts: lua local Character = script.Parent local Player = game.Players:GetPlayerFromCharacter(Character) or in starterplayerscripts: lua local Player = script.Parent local Character = Player.Character or Player.CharacterAdded:Wait() a Remote Event or function depending on what youre doing: ```lua
local Remote = path.To.Remote -- change

Remote.OnServerEvent:Connect(function(Player, ...)
...
end)

#

I can give additional info if you tell me exactly what your script is supposed to do

#

last option then