What I want achieved is the possibility to be able to place a model when you press a Screen GUI Button, everybody can see the model. The current model name is NPC, when the user places the Human, it names it, for example, 'RobloxGameingStudios_NPC'
NPC is where the model name is, and RobloxGameingStudios is the user who placed it's name. like: 'ROBLOX_NPC',
This tells us ROBLOX placed a NPC.
The reason I want it to be named that is because It would be easier to edit the model that way, Ill tell u more about that when the game comes out.
I'm good enough, that I realize this is going to need a remote event or two, and a server-sided script.
Script Attempt:
Local Script Inside the button:
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.PlaceHuman:FireServer()
end)
Server-Sided Script:
game.ReplicatedStorage.PlaceHuman.OnServerEvent:Connect(function()
BlockName = "NPC"
local block = game.ReplicatedStorage.Blocks[BlockName]:Clone()
local x = math.floor(pos.X)
local y = math.floor(pos.Y)
local z = math.floor(pos.Z)
local BlockSize = block.Size.X
block.Position = Vector3.new(x + BlockSize/2, y + BlockSize/2, z + BlockSize/2)
if passive then
block.Transparency = 0
block.Anchored = true
block.CanCollide = true
block.Name = game.Players.LocalPlayer.. "_" ..BlockName
end
block.Parent = workspace.Blocks[plr.Name]
end)
What game am I making? i'm trying to make a god-like game.

1 comment
have you simply tried using model:SetPrimaryPartCFrame(CFrame.new(m.Hit.p)) then getting the button1 and then firing the remotes..?