local m = Instance.new("Hint")
script.Parent.MouseButton1Down:connect(function(OnClicked) m.Parent = game.Workspace m.Text = "Has an order!" wait(10) m.Parent = nil
script.Parent.MouseButton1Down:connect(OnClicked) end)
So I tried to use player.Name.. before "Has an order!" and it didnt work.. Can someone make it so it makes it say the local players name and then after it "Has an order!"?
So something like "Gamerbeeze1 has an order!" but it will work with any username, please and thanks.
I don't see anything in your script that has to do with player names. If you just put "player.Name" before "Has an order", it won't work because you didn't even put anything that specifies the player.
Here's the problems with your script :
local m = Instance.new("Hint") --If you want this to show up every time the player clicks the button, put it in the function script.Parent.MouseButton1Down:connect(function(OnClicked) m.Parent = game.Workspace m.Text = "Has an order!" --All you did is put "Has an order!". There's nothing about player names here. wait(10) m.Parent = nil script.Parent.MouseButton1Down:connect(OnClicked) end) --This line of code isn't neccesary
Here's how I did it :
script.Parent.MouseButton1Down:connect(function() local m = Instance.new('Hint') --Creates new hint m.Parent = game.Workspace --Parents it to workspace m.Text = game.Players.LocalPlayer.Name.." has an order!" --Puts the localplayer name before the text. wait(10) m:Destroy() --Removes the hint. end)
Also just a note. Hints can still be used but they're deprecated, so I don't recommend you use this all the time.
Here's a link about hints if you want to know more about it :