generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Running # localscript from ReplicatedFirst

Previous Thread :: Next Thread 
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
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
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
11 Feb 2017 10:56 PM
You can just give a forcefield with a server script.
Report Abuse
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
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
brightScarf is not online. brightScarf
Joined: 02 May 2016
Total Posts: 236
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
pericuIosa is not online. pericuIosa
Joined: 17 Dec 2016
Total Posts: 70
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
Mister_Manakin is not online. Mister_Manakin
Joined: 16 Sep 2009
Total Posts: 1935
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image