#this is for a PlaceMent system for parts

1 messages · Page 1 of 1 (latest)

odd tangle
#

why

#
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

sour otterBOT
#

studio** You are now Level 1! **studio

odd tangle
#

@white plume what can I do to fix the(Ray.new()) part

white plume
#

looks fine to me but you are using Mouse and mouse, the lowercase mouse has the ray not the uppercase one

#

@odd tangle

odd tangle
#

So what should I do just change the Mouse to mouse

odd tangle
odd tangle
#

k im new to that placement stuff

odd tangle
# white plume YUP

i was like why was it giving errors on lua local mouse = Mouse.Unityit was auto to Mouse

#

now new error

sour otterBOT
#

studio** You are now Level 3! **studio

odd tangle
#

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

odd tangle
flint root
#

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)