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: Big help needed on this problem.

Previous Thread :: Next Thread 
ikefighter is not online. ikefighter
Joined: 16 Feb 2015
Total Posts: 12
07 Jun 2017 11:53 PM
Alright. I'm making my own tool that lets you place 'blocks' where you click. Since there is filtering enable available. I'm going to use remote events to place blocks for everyone to see.


--< A Server Script in ServerScriptService >--
remote.Main.PlaceModel.OnServerEvent:Connect(function(player,model,assetGroup,cframe)
local playerBase = workspace.BuildingAreas:FindFirstChild("Area"..player.gameData.baseNumber.Value)
local myStorage = workspace.ConstructionStorage:FindFirstChild(player.Name.."'s construction")
local base =

workspace.BuildingAreas:FindFirstChild("Area"..player.gameData.baseNumber.Value)
local reg = Region3.new(base.RegionPart1.Position,base.RegionPart2.Position)
local finalRegion3 = workspace:FindPartsInRegion3(reg,player.Character)

or _, part in pairs(finalRegion3) do --< Make sure the cursorBlock is in the player's build area.
print(part.Parent.Name)
if part.Parent.Name == model then
local finalProduct = replicatedStg.GameStg.GameBlks:FindFirstChild(assetGroup):FindFirstChild(model
):Clone()
finalProduct.Parent = myStorage
finalProduct.ModelConfig.ModelOwner.Value = player
finalProduct:SetPrimaryPartCFrame(cframe)
finalProduct.Name = finalProduct.Name.." (#"..math.random(1,100000)..")"
break
end
end
end)

As you can see, I'm using Region3 functions to make sure the player is not stamping out if his/her baseplate. The problem is, after a while of placing blocks, you can't place anymore blocks all of a sudden (Non - stop placing), If you click during this time, no block will be placed. Is there a way to fix this problem?

Thank you.

NoBoot.
Report Abuse
EncodedLua is online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
07 Jun 2017 11:55 PM
After about how many models/blocks on average?
After about how long on average?
Could it be because you're inserting too many models within a short amount of time? (Not sure if this is throttled)

discord.gg/fissygames
Report Abuse
ikefighter is not online. ikefighter
Joined: 16 Feb 2015
Total Posts: 12
07 Jun 2017 11:58 PM
The remote event fires everytime I place a block. I'm also aware of the limits a Remote Event has. But this is another problem, I completely removed the region3 functions or anything that had to do with region3, and it worked. Is it because of the region3?

(The region3 is there so players won't place out of their baseplate BTW.)
Report Abuse
EncodedLua is online. EncodedLua
Joined: 02 May 2012
Total Posts: 1555
08 Jun 2017 12:01 AM
It might have something to do with how resource intensive Region3s and Rays are. I'm not sure. But now that you've found part of your source, start adding pieces back slowly and see what messes it up. If it's Region3s in general, then try a different approach.

discord.gg/fissygames
Report Abuse
ikefighter is not online. ikefighter
Joined: 16 Feb 2015
Total Posts: 12
08 Jun 2017 12:05 AM
Alright! Thanks for the help! I'll be sure to reply back if something isn't right!
Report Abuse
ikefighter is not online. ikefighter
Joined: 16 Feb 2015
Total Posts: 12
08 Jun 2017 11:36 PM
It appears that i could not fix the problem doing what you said. Is there any solution to this annoying problem?

Thanks.
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