I wanted to make that if you trigger the proximity prompt the model will disappear,but for some reason it doesn’t disappear without an error,how can i fix it?
local ProximityService = game:GetService("ProximityPromptService")
local Proximity = script.Parent:WaitForChild("ProximityPrompt")
local GasterSound = script.Parent:WaitForChild("Gaster")
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(
2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
local Goals = {
Transparency = 1
}
Proximity.Triggered:Connect(function()
GasterSound:Play()
for i, part in pairs(script.Parent.Parent:GetChildren()) do
if part.ClassName == part then
TweenService:Create(part,Info,Goals)
end
end
end)
Would really appreciate any help