After I have unequpied the tool the animation is still stuck on my screen.
Code:
–| Made by CustomTech’s Developer TheBlockZockt
local FrequencyToggleButton = script.Parent.Container.ToggleRadio
local Assets = script.Parent.Assets
local Position_01 = UDim2.new(0, 0,1.167, 0)
local Position_02 = UDim2.new(-0.002, 0,4.111, 0)
local Player = game.Players.LocalPlayer
local UserInputService = game:GetService(“UserInputService”)
local TextBoxFocusing = false
local Focus = true
local Debounce = false
local Template = script.Parent.Container.FrequencyTemplate
local Frequency = “Frequency_01”
–| FUNCTIONS
local function sendMessage(authro, message, FrequencyRecieved)
if FrequencyRecieved == Frequency and script.Parent.Container.Activated.Value and not Debounce then
Debounce = true
script.Parent.Container.FrequencyTemplate.TextName.Text = " "
print(FrequencyRecieved…"=="…Frequency)
script.Parent.Container.FrequencyTemplate:TweenPosition(Position_01)
script.Parent.Container.FrequencyTemplate.Visible = true
wait(1)
local Length = string.len(message)
local Loop = 1
repeat
script.Parent.Container.FrequencyTemplate.TextName.Text = authro.Name…": "…string.sub(message, 0, Loop)
Loop = Loop + 1
script.Parent.Container.Sound:Play()
wait(0.04)
until Loop == Length + 1
script.Parent.Container.Sound:Stop()
wait(3)
script.Parent.Container.FrequencyTemplate:TweenPosition(UDim2.new(0, 0,9.194, 0))
wait(1)
script.Parent.Container.FrequencyTemplate.Visible = false
Debounce = false
end
end
local function playSound(typeofSound)
typeofSound:Play()
end
Player.Chatted:Connect(function(msg)
if Focus then
game.ReplicatedStorage.SendMessage:FireServer(msg, Frequency)
end
end)
game.ReplicatedStorage.SendMessage.OnClientEvent:Connect(function(author, msg, FrequencyRecieved)
if FrequencyRecieved == Frequency then
print(FrequencyRecieved…"=="…Frequency)
sendMessage(author, msg, FrequencyRecieved)
end
end)
while wait() do
Frequency = script.Parent.Container.TextBox.Text
if game.Players.LocalPlayer.Backpack:FindFirstChild(“Radio”) or game.Players.LocalPlayer.Character:FindFirstChild(“Radio”) then
script.Parent.Parent.Frequency_Changer.Enabled = true
else
script.Parent.Parent.Frequency_Changer.Enabled = false
end
end