Script inside workspace:
local humanoid = game.Workspace.Speler.Humanoid game.Players.PlayerAdded:connect(function(player) player = player end) humanoid.MaxHealth = 0 humanoid.Health = 0 humanoid.HealthChanged:connect(function(health) local players = game:GetService("Players") humanoid.Parent.Head.Touched:connect(function(otherpart) if otherpart.Name == "Handle" then local character = otherpart.Parent.Parent local player = character:GetPlayerFromCharacter() local replicatedstorage = game:GetService("ReplicatedStorage") local remote = Instance.new("RemoteEvent", replicatedstorage) remote:FireClient(player) end end) end)
The error Roblox from Roblox Studio: GetPlayerFromCharacter is not a valid member of Model
I think i used GetPlayerFromCharacter() incorrectly(line 13).
MachoPiggies is incorrect, and yes, you used it incorrectly. GetPlayerFromCharacter() is a method that can only be called from the Players API:
local player = game.Players:GetPlayerFromCharacter(character)