When a player equips a tool, the tool get's transferred to the player's character in workspace. So i thought this would work:
humanoid.Parent.Head.Touched:connect(function(otherpart) if otherpart.Name == "Handle" then local character = otherpart.Parent.Parent local player = character:GetPlayerFromCharacter(character) print(character.Name)
I basically have a sword as a tool in the backpack. Otherpart.Parent.Parent would be the player's character, since the tool got transferred inside the player's character in workspace.
Why does Roblox Studio give this error?
GetPlayerFromCharacter is not a valid member of Model
You used a function that you never created
...(character)