I am making a AreaUi, when the player walks into a part which will be named after a place. When the player walks into said part it will display the name of the part. The problem I am having is that the transparency fade is a bit to choppy as it goes frame by frame. I’ve asked multiple people and groups of how to solve this issue but no one has replied so I came to the dev forum as a last chance kind of thing.
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local title = script.Parent.Title
local area = game.Workspace.Area
local toggle = false
while true do wait(1)
for i, section in pairs(area:GetChildren()) do
local pos1,pos2 = (section.Position - (section.Size / 2)),(section.Position + (section.Size / 2))
local region = Region3.new(pos1,pos2)
local playersfound = game.Workspace:FindPartsInRegion3(region)
for i, playersInArea in pairs(playersfound) do
if playersInArea:FindFirstAncestor(player.Name) then
toggle = true
if title.Text == section.Name then
else
title.Text = section.Name
title.Parent.Enabled = true
for i = 1,0,-0.1 do
title.TextTransparency = i
wait(0.2)
if i == 0 then
break
end
end
wait(1)
for i = 0,1,0.1 do
title.TextTransparency = i
wait(0.2)
if i == 1 then
break
end
end
end
else
toggle = false
end
end
end
end
