I'm trying to implement a "pet" system where a pet model is parented to the character in the workspace. I'm trying to get the character of the script that is parented to the pet that is parented to the character. However, "Workspace" is printed not player name.
local character = script.Parent.Parent local pet = script.Parent local function attack(player, target) print(character)
Attack function is hooked to a remote event that is fired from a local script. link to image of hierarchy: https://imgur.com/a/dB2GbLU