I’m trying to make it when the remote event fire it put a gui over the other player head.
Module script:
local index = math.random(#candidates)
local player1 = candidates[index]
local RS = game:GetService("ReplicatedStorage")
local ClientGui = RS.Events:WaitForChild("ClientGui")
print(player1.Name)
QuestName.Value = Name
QuestDescription.Value = "Kill " .. player1.Name .. " in this amount of time."
local char = player1.Character
if char then
local Tracker = Instance.new("BoolValue", char)
Tracker.Name = "Tracker"
ClientGui:FireClient(Player, char)
char.Humanoid.Died:Connect(function()
if (Player.Character.HumanoidRootPart.Position - char.HumanoidRootPart.Position).magnitude < 55 and Tracker then
Module.Reward(Player, Folder, 5)
Module.Destroy(Player)
if char:FindFirstChild("Tracker") then
Tracker:Destroy()
end
end
end)
end
Local Script(Remote Event)
local RS = game:GetService("ReplicatedStorage")
local ClientGui = RS.Events:WaitForChild("ClientGui")
ClientGui.OnClientEvent:Connect(function(Player, enemychar)
print("Remote Event fired")
local BillBoardGui = script.BillboardGui:Clone()
BillBoardGui.Parent = enemychar:FindFirstChild("Head")
BillBoardGui.StudsOffset = Vector3.new(0, 5, 0)
end)
Anyone know why it not working?