Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone fix my admin command's script that uses a player's username?

Asked by
Zvtu 4
5 years ago

I've been trying to make an admin commands menu, where when you type a player's username into a TextBox and click an action then that player will receive it. I'm a starter scripter and really don't know what I'm doing or if I'm even wording this right. Thank you for reading!

local player = game.Players.LocalPlayer
local Username = script.Parent
if Username.Text == player.Name then
    local tool = game.ServerStorage.GrenadeLauncher:Clone()
    tool.Parent = player.Backpack

end
0
Sorry, if my script is confusing to people who are better than me. It didn't work in game when I tested it. Zvtu 4 — 5y
0
um http_shawn 1 — 5y
0
What is username? http_shawn 1 — 5y
0
It says it in the question, but Zvtu. Why? Zvtu 4 — 5y

Answer this question