Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I active this module by touching a part?

I tried to active this module script: https://web.roblox.com/library/3644307275/ActiveVignette-Opensource by making a LocalScript in a part:

function onTouched(hit)
	local ActiveVignette = require(script:WaitForChild("VignetteService"))

local Vignette = ActiveVignette:CreateVignette({script.VignetteService.Physics.ParticleEmitter}) --// creates a new vignette

Vignette:Enabled(true) --// disables the particle effects associated with this vignette

--Vignette:Destroy() --// completely destroys the vignette

Vignette:SetDistance(5) --// Set's the distance from the camera (Larger can result in phasing)

Vignette:UpdateEnabled(true) --// Determines whether or not the vignette will auto adjust to new FOV's and AspectRatio changes.

wait(10)

Vignette:Enabled(false)
end
script.Parent.Touched:connect(onTouched)

And it didn't worked, no errors in the Output btw

4 comments

0

LocalScripts cannot run in the Workspace, this must be a normal Script

0

Yeah but if I make a normal script it wont run the RenderStepped @BashCaster

0

You have to put it in StarterPlayerScripts then.

0

Okay ill try

1 answer

Okay thanks for help everyone who answered, I manage to fix the script by placing the module in workspace and requiring it from StarterCharacterScripts! Thank you for taking your time to answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.