Grid revolving around player

Hello! I am trying to make a Fortnite like building system, but I ran into 1 issue. This is with it revolving around the player. I’m not quite sure how to do this and any help would be appreciated. Thank you.

3 Likes

There is a full battle royale kit made by roblox, free to use.

Features

  • Code for 3rd-person cameras.
  • A robust and customizable ranged weapon system, including 9 different weapons preconfigured.
  • A building system.
  • A destruction system.

Link: Battle Royale | Documentation - Roblox Creator Hub

3 Likes

Wow, I had no idea! I assume I would be allowed to take the script and use it for my own game as the game files are public? Am I correct?

Yes, Its’s a free to use kit. Made my roblox.

Is there anyway I could just get the grid script? Looking through the files I can’t see the script for it.

Not sure, where stuff is located. As I haven’t opened the file.

Try searching, In ReplicatedStorage or something for the builds? Then seeing if they’re is any script.

		local localPlayer = Players.LocalPlayer
		local character
		local humanoidRootPart
		if localPlayer then
			character = localPlayer.Character
			if character then
				humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
			end
		end

		if humanoidRootPart then
			local distFromHumanoidToCamera = (humanoidRootPart.Position - game.Workspace.CurrentCamera.CFrame.Position).Magnitude

			local placementCFrame = CFrame.new(
				game.Workspace.CurrentCamera.CFrame.Position + game.Workspace.CurrentCamera.CFrame.LookVector.Unit * distFromHumanoidToCamera,
				game.Workspace.CurrentCamera.CFrame.Position + game.Workspace.CurrentCamera.CFrame.LookVector.Unit * 2 * distFromHumanoidToCamera
			)

			local faceRotation =
				BitOps.getVerticalFaceFromOccupancy(ObjectTypeConfigurations[BuildingSystem.currentSimpleObjectType].OCCUPANCY) and
				BuildingSystem.currentFaceRotation or 0

			BuildingSystem.grid:setPlacementCFrame(
				placementCFrame,
				BuildingSystem.currentSimpleObjectType,
				BuildingSystem.currentRotation,
				faceRotation
			)
		end

I think I found it. It looks correct to me. Let me try and hook it up to my first attempt.

1 Like

That looks like It’s correct, to me. Not sure if there is any other scripts related to it though.

There are, I’m just scanning them now for any code I’ll need, thanks for your help!

No problem, just glad I can help you out.

I’ve been looking through the scripts for awhile, and I don’t fully understand it all. I just want to take a small amount of code out of it to put into my script, but the code is scattered between multiple modules. Could you maybe look through the code and show me witch pieces of it I need?

Yes absolutely, you can add my discord here. [SCRIPTER] Michael#0001

I’ve searched for 15 minutes, and found nothing either. Maybe, just copy all scripts, and modules, Folders. And paste in your game?

Sent you a friend request on discord, lets talk about it there.

What’s your discord name, cause I changed mine to xMichael_TH#0001

I sent you a DM saying my MrOpScripter.