game:GetService("ServerStorage").KRYenergizer.Event:Connect(function()
print("drakobloxxers")
game:GetService("Players").PlayerAdded:Connect(function(plr)
print(plr.Name)
end)
end)
I wan’t to get the player’s name, but for some reason, it does not run. Simple as that.
“drakobloxxers” does run though.
Are you testing alone? the player added event might have already fired by the time you get to that point
try childadded instead of playeradded playeradded is broken sometimes
so replace
game:GetService("Players").PlayerAdded:Connect(function(plr)
with
game.Players.ChildAdded:Connect(function(c)
if c:IsA("Player") then
local player = c --or c only--
print(player)
end
end)
I need to know the players specific player, this just gets the newest player instead of the player.
I assume that the player is joining prior to the KRYenergizer event firing.
What is it that you are attempting to do?
It’s a tool that gives a power up to the character who used it.
looking now im gonna put the player thing first when i can code oops
In that case, you should be passing the player who purchases it through the KRYenergizer event instead of trying to determine it again.
Blumaimn2
(Beans2)
#8
can u show the script firing the KRYenergizer.Event event
What are you trying to achieve?
system
(system)
Closed
#10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.