I need to make a script that gives the player a forcefield when they touch a part and destroy the forcefield when they stop touching the part. I realized the script below wouldn't work until halfway through writing it.
local ActivationPart = script.Parent
if ActivationPart.Touched == true then
local Force = Instance.new("ForceField")
Force.Parent = //This is where I realized this wouldn't work
else
Force:Destroy()
end
I'm new to Lua and really suck at it, so sorry that this script is trashy.

3 comments
but I need to make the forcefield disappear when you stop touching the part
nvm I figured it out thx
No problem!