Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Solved by Me]How do I make a build script with a Plot?

Asked by 4 years ago
Edited 4 years ago

I made this build script, but it won't work and i am not getting any errors, what suppose to happen is 1.wait until the GUI is pressed 2.Make a clone of the model 3.Make the clone follow the mouse 4.test if the player wants to place the object in the plot 5.makes another clone and place it where the player wants to put it

01local player = game.Players.LocalPlayer
02local mouse = player:GetMouse()
03local ReinforcedIronWall = game.Workspace.BluePrintWalls.ReinforcedIronWall
04 
05---------------------------------------------------------------------
06 
07local function round (n)
08    return math.floor(n + 0.5)
09end
10 
11---------------------------------------------------------------------
12 
13local uis = game:GetService("UserInputService")
14      uis.InputBegan:Connect(function(a,b)
15 
View all 61 lines...

please help, i don't understand why it wont work because i can't make it to work.Thank you in advance

1 answer

Log in to vote
0
Answered by 4 years ago

i made the build script now, i'm just working on the collision part so what i done is when the part is not on top of the plot i just set an anchor Position so its anchor to that position until the mouse.hit .position is equal to the top of the plot and i added offset so all parts of the model is above the part

this script works for models it also makes a semi transparent blueprint, it also has destroy mode so it would destroy the model it works by pressing right click and pressing left click on the model and right click again to go back to build mode, and just click to build, it has changeable grid too. This script is not done yet, i'm making it so scroll wheel goes through the build selection and more stuff

001local Player = game.Players.LocalPlayer
002local char = Player.Character or Player.CharacterAdded:Wait()
003local RunService = game:GetService("RunService")
004local UserInputService = game:GetService("UserInputService")
005local Mouse = Player:GetMouse()
006local Gridsize = 1
007local Model = game.Workspace.Conveyor
008local ModelPrimaryPart = Model.PrimaryPart
009 
010local Plot = game.Workspace.Plots.Plot
011local HalfSizeforX = Plot.Size.X/2
012local HalfSizeforZ = Plot.Size.Z/2
013local Heightlimit = 100
014 
015local PosX
View all 129 lines...
0
for those who wanna use this all you have to set up is the model and primarypart spectacularnicknack 2 — 4y
0
i just remember this site so i made the answer when i returned here spectacularnicknack 2 — 4y
Ad

Answer this question