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: Local parts: how to manipulate them with scripts?

Previous Thread :: Next Thread 
badgraphix is not online. badgraphix
Joined: 26 Nov 2007
Total Posts: 22800
01 May 2016 10:11 AM
I suppose I could probably find a workaround but putting them all in the local player and set up a bunch of listeners, but I was wondering if there was another solution to this problem.



This is Cemetery of the Forgotten:
https://www.roblox.com/games/370141/Cemetery-of-the-Forgotten

The first puzzle involves you touching a gravestone that's slightly out of line to open a gate.
This utilizes a standard "onTouched" server script.


However, if I make the entire cemetery local parts (parented to the local player's camera), the script doesn't appear to work.

How do I get it to function as it did on the server level?
Report Abuse
BanTech is not online. BanTech
Joined: 31 Dec 2015
Total Posts: 886
01 May 2016 10:52 AM
Local parts are local. They require LocalScripts in the player (PlayerGui, PlayerScripts) or the Character to manipulate them.
Report Abuse
badgraphix is not online. badgraphix
Joined: 26 Nov 2007
Total Posts: 22800
01 May 2016 11:30 AM
Dang, looks like this will be a little more than a simple porting process after all.
Report Abuse
iJacobness is not online. iJacobness
Joined: 20 Jan 2014
Total Posts: 4944
01 May 2016 11:30 AM
dont those mess up physics? use filteringenabled


Report Abuse
badgraphix is not online. badgraphix
Joined: 26 Nov 2007
Total Posts: 22800
01 May 2016 12:00 PM
@iJacob

That's what I heard, however all the parts in my game are anchored so it shouldn't really matter.





I turned FilteringEnabled on however that doesn't solve my problem (though I'll be keeping it on.)


Here's my current issue:


I have the gravestone you touched. It has an onTouched server script inside of it. Keep in mind that these are all local parts we're working in, so the server doesn't know they're there.

In simulated online mode, my character on the client touches it and the script doesn't fire.

In Play Solo mode, it works successfully since Play Solo mode is a hybrid between the client and server.



Now, this obviously isn't satisfactory because I need it to work in an actual server.




I try another method: a local script inside the player.

function openWellGate()
workspace.CurrentCamera.Cemetery.Area1.WellGate:Destroy()
end
workspace.CurrentCamera.Cemetery.Area1.OutlierGravestone.Headstone.Touched:connect(openWellGate)



This method appears to work, so it looks like I'm going to have to recode the place to work inside the script. It's a pretty simple place, so it shouldn't be too difficult.


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