Hey Cookie Tech!
I am working on a game, and I tried making a -pin command, but when I run the command in-game nothing happens. Below is the code, and I photo of what it should look like.
local Players = game:GetService("Players")
local prefix = "-"
local GroupId = 13185198
local MinimumRank = 5
game.Players.PlayerAdded:Connect(function(Player)
Player.Chatted:Connect(function(Message)
if Player:GetRankInGroup(GroupId) >= MinimumRank then
Player.Chatted:Connect(function(Msg)
if Msg:sub(1, 5) == prefix.."pin " then
script.Parent.PinnedMessage.Text = Msg
end
local Target = Players:FindFirstChild(Msg:sub(6))
end
end)
end
Thank you in advance!
Forgot to add; this is what the output shows.
Noah
3
The 404 is likely from another script.
Thank you for letting me know that!
Do you have any insight on how I could get the command to work?
How would the text show on the screen if it isn’t on??
system
Closed
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.