Hello Developer! I am having troubling calling a function I created from a module script to client. I did this because I had someone told me to do something like this to organize the script more. So I was wondering why it wouldn’t work.
Here is the module:
local module = {}
--Prompt
local prompt = workspace.XmasEvent:WaitForChild("EventSnowglobe"):WaitForChild("Glass"):WaitForChild("Attachment"):WaitForChild("ProximityPrompt")
--Parts
local model = workspace.XmasEvent:WaitForChild("EventSnowglobe")
local Glass = model:WaitForChild("Glass")
local NeonGlass = model:WaitForChild("GlassNeon")
--Functions
local function GlassDisappear()
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
1, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.Out -- EasingDirection
)
local tweenInfoNeonFade = TweenInfo.new(
2, -- Time
Enum.EasingStyle.Quint, -- EasingStyle
Enum.EasingDirection.Out -- EasingDirection
)
local GlassTween = TweenService:Create(Glass, tweenInfo, { Transparency = 1 })
local NeonTweenAppear = TweenService:Create(NeonGlass, tweenInfo, { Transparency = 0 })
local NeonTweenDisppear = TweenService:Create(NeonGlass, tweenInfoNeonFade, { Transparency = 1 })
task.wait()
GlassTween:Play()
NeonTweenAppear:Play()
NeonTweenAppear.Completed:Wait()
wait(1)
NeonTweenDisppear:Play()
end
return module
-- Tables store multiple values in one variable
local MyFunctions = {}
-- Add a few functions to the table
function MyFunctions.foo()
print("Foo!")
end
function MyFunctions.bar()
print("Bar!")
end
-- ModuleScripts must return exactly one value
return MyFunctions