#this is for a PlaceMent system for parts
1 messages · Page 1 of 1 (latest)
first file is the main script
local rep = game:GetService('ReplicatedStorage')
local Place = rep:WaitForChild('PlaceStructure')
local Stru = rep:WaitForChild('PlaceObject')
Place.OnServerInvoke = function(player,StructureName,StructureCFrame)
local Crafted
local real = Stru:FindFirstChild(StructureName):Clone()
if real then
real.CFrame = StructureCFrame
real.Parent = workspace
Crafted = true
else
Crafted = false
end
return Crafted
end```no errors here
but the error is right here
** You are now Level 1! **
@white plume what can I do to fix the(Ray.new()) part
looks fine to me but you are using Mouse and mouse, the lowercase mouse has the ray not the uppercase one
@odd tangle
So what should I do just change the Mouse to mouse
At least that’s the only error
YUP
k im new to that placement stuff
i was like why was it giving errors on lua local mouse = Mouse.Unityit was auto to Mouse
now new error
** You are now Level 3! **
oh wait im dumb its
local newCFrame = CFrame.new(position.x,position.y + YOffSet[1],position.z)
but when i test it, the Part spawns infront of me not on the Mouse
what can i do to fix the Part to follow the mouse
i got you guys here
local InputuserService = game:GetService("UserInputService")
local player = game:GetService("player").IocalPlayer
local mouse = player:GetMouse()
UserInputService.InputBegan:Connect(function(input)
if put.UserInputType == Enum.UserInputType.MouseButton1 then
local part = instance new("Part")
part.Anchord = true
part.BrickColor = part.BrickColor.new(Really black")
part.Position = mouse.Hit.Position
part.Parents = workspace
end
end)