Hello guys!
I am trying to get back into Roblox Scripting which I haven't touched in 5 months and I started off with a fun project. What I made is a special part that explodes when a player touches it.
Here is the code:
local trap = script.Parent
local function onTouch(part)--if part is player then local explosion = Instance.new("Explosion", trap) trap:Destroy() end
trap.Touched:connect(onTouch)
I forgot how to make it detect if the part touching the trap is a player so therefore it will go off when I run the game because it's touching the baseplate.
Any help would be appreciated. Thanks!
