|
| 11 Feb 2017 10:53 PM |
So I'm wondering if this is possible... I want to be able to run a script that triggers a localscript from ReplicatedFirst that gives a player a forcefield. Does this work? |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2017 10:56 PM |
| You can just give a forcefield with a server script. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2017 10:58 PM |
| How? I've been trying to do something like this for a bit and have been having trouble with a solution. |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2017 11:03 PM |
Sorry, maybe I should restate this: What I'm exactly trying to do is give a player a forcefield from touching a part. Just having trouble having the script find the model (Character). I can't get the local player in a serverscript, so what can I do to get the model? |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2017 11:15 PM |
Use the Touched event, check to see if the part that hit it has a Humanoid, then insert the ForceField into the character model.
http://wiki.roblox.com/index.php?title=API:Class/BasePart/Touched |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2017 11:23 PM |
Don't need to access the player with a touched script. Derive the character from the part that touches the brick:
script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") then Instance.new("ForceField").Parent = hit.Parent end end) |
|
|
| Report Abuse |
|
|