Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script for making a part turn invisible when a specific message is typed in chat
- local part = script.Parent -- Assuming this script is a child of the part
- local function onChat(message, player)
- -- Check if the message is the specific one
- if string.lower(message) == 'PUT YOUR TEXT HERE' then
- part.Transparency = 1 -- Replace this part with your code
- end
- end
- -- Connect the 'Chatted' event of the player to the 'onChat' function
- game.Players.PlayerAdded:Connect(function(player)
- player.Chatted:Connect(function(message)
- onChat(message, player)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment