I really dont understand that error so I’m hoping that one of you dev’s do.
This is the Localscript:
local camera = game:GetService("Workspace").CurrentCamera
local frame = script.Parent:WaitForChild("Frame")
local player = game:GetService("Players").LocalPlayer or game:GetService("Players").PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
humanoid.Died:Connect(function()
local killer = character.Humanoid:FindFirstChild("creator")
local killerCharacter = killer.Value.Character
local killerName = killer.Value.Name
if killer.Value then
frame.Visible = true
camera.CameraSubject = killerCharacter.Humanoid
frame.TextLabel.Text = killerName.." killed you nub lol XDD"
wait(5)
frame.Visible = false
camera.CameraSubject = humanoid
end
end)
Use the official roblox weapon kit as it tags player who kill others. That hopefully should fix the problem. There is nothing wrong with the script it’s just the weapon lol
function TagHumanoid(humanoid, player)
local Creator_Tag = Instance.new("ObjectValue")
Creator_Tag.Name = "creator"
Creator_Tag.Value = player
Debris:AddItem(Creator_Tag, 2)
Creator_Tag.Parent = humanoid
end
local camera = game:GetService("Workspace").CurrentCamera
local frame = script.Parent:WaitForChild("Frame")
local player = game:GetService("Players").LocalPlayer or game:GetService("Players").PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
humanoid.Died:Connect(function()
local killer = character.Humanoid:FindFirstChild("creator")
if not killer then return end
local killerCharacter = killer.Value.Character
local killerHumanoid = killerCharacter:FindFirstChild("Humanoid")
local killerName = killer.Value.Name
if killer.Value then
frame.Visible = true
camera.CameraSubject = killerHumanoid
frame.TextLabel.Text = killerName.." killed you nub lol XDD"
wait(5)
frame.Visible = false
camera.CameraSubject = humanoid
end
end)