Background: I'm making a Holo training facility for a group I'm in and this is part of it's commands. The command is to display a message (like admin scripts) on every player's screen Gives me this error: 15:48:29.964 - Unable to cast value to Object
The game has Experimental Mode off
Server Script:
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if game.Players:FindFirstChild(player.Name):GetRankInGroup(3207228) > 14 then
if msg:sub(1,3) == "/M " then
local filteredText = game.Chat:FilterStringForBroadcast(msg:sub(4), player)
game:GetService("ReplicatedStorage").Message:FireClient(filteredText)
end
end
end)
end)
There's a Remote Event in Replicated Storage that the Server Script fires, and in return a local script in PlayerGui copies a pre made 'template' gui and changes the text and makes it visible.
Local Script in Player's PlayerGui
game:GetService("ReplicatedStorage").Message.OnClientEvent:connect(function(filteredText)
local a = script.Parent:FindFirstChild("Template"):Clone()
a.TextLabel.Text = player..": "..filteredText
a.TextLabel.Visible = true
wait(5)
a:Remove()
end)
Any help would be appreciated.

1 comment
:Remove is deprecated, :connect is deprecated, you should know what to do since i said this a million times.