So I’m trying to make a fade-in frame that fades once the ProximityPrompt is interacted with. I’m horrible at doing fade in’s and fade outs or stuff like that in general so some help would really be appreciated.
My script isn’t working so if anyone could help at all, it would be great.
Edit: When I’m in the game and try to make it visible, nothing appears anyway. When I start with it visible, I can’t make it invisible again.
local Proximity = workspace.inter.ProximityPrompt
local gui = script.Parent
local fog = game.Lighting.FogEnd
Proximity.Triggered:Connect(function()
for i = 0, 1, 0.01 do
gui.BackgroundTransparency = i
end
end)
If this doesn’t work, tell me if there are any errors, what’s working/ not working, etc.
local Proximity = workspace.inter.ProximityPrompt
local gui = script.Parent
local fog = game.Lighting.FogEnd
local TweenService = game:GetService("TweenService")
Proximity.Triggered:Connect(function()
local info = TweenInfo.new(1)--Here's a 1 second tween
local properties = {BackgroundTransparency = 0}--Will set the BackgroundTransparency to 0
local tween = TweenService:Create(gui,info,properties)
tween:Play()--Play animation
end)
If no, have you tried printing in the event to see if it’s even fired?
if it doesn’t print, it’s a problem with your other script, otherwise it’s a problem with the gui.