Hi there,
So my game kept getting exploited so I decided to turn on Filtering Enabled.
However, as a result of this, some of my scripts doesn't work and I looked into investigation in roblox wiki. Tried to do it my self but failed.
Can you help convert this script into filtering enabled compatibility?
local player = nil
script.Parent.Equipped:connect(function()
player = game.Players:FindFirstChild(script.Parent.Parent.Name)
gui = script.MicrophoneGUI
if (player.PlayerGui:FindFirstChild("MicrophoneGUI") == nil) then
gui:clone().Parent = player.PlayerGui
end
end)
script.Parent.Unequipped:connect(function()
if (player.PlayerGui:FindFirstChild("MicrophoneGUI") ~= nil) then
player.PlayerGui.MicrophoneGUI:remove()
end
end)
local t = script.Parent.Parent.Parent.Title
local m = t.Parent.Message
local p = t.Parent.Player
function Message()
script.Parent.Title.Text = t.Value
script.Parent.Body.Text = m.Value
script.Parent.From.Text = p.Value
for i = 1,0,-0.1 do
script.Parent.Body.TextTransparency = i
script.Parent.Body.TextStrokeTransparency = 1
script.Parent.Title.TextTransparency = i
script.Parent.Title.TextStrokeTransparency = 1
script.Parent.From.TextTransparency = i
script.Parent.From.TextStrokeTransparency = 1
wait()
end
end
t.Changed:connect(function()
Message()
end)
m.Changed:connect(function()
Message()
end)
|