✓ Accepted answer
I really do have the feeling you aren't trying and are not motivated to script. This became quite clear to me when you come here for help before trying anything yourself. Everything in this script could have easily been found with the help of the wiki
Please try.
http://wiki.roblox.com/index.php?title=API:Class/ClickDetector
ClickDetectors work like this:
1) Set it up
local clicker=script.Parent
function onMouseClick(plr)
end
clicker.MouseClick:connect(onMouseClick)
2) Create a character variable and create a new forcefield instance.
local character=plr.Character
Instance.new("ForceField", character)
3) What the final code should look like:
local clicker=script.Parent
function onMouseClick(plr)
local character=plr.Character
Instance.new("ForceField", character)
end
clicker.MouseClick:connect(onMouseClick)
This is stuff that was extremely easy for me to find with the help of the wiki. I suggest you use it as a ressource before posting here.
Cheers!
2 comments
Did you try? That doesn't look like trying. Learn the language and understand the concepts first.
You're right. I did not try my best, I shall keep on trying and read the wiki.