Why wont this work? Im trying to make it so when u build it places a human, and when u click exit build mode u cant build no more? There are no errors.
Local Human placing script
local Value1 = game.Players.LocalPlayer.Build
local RemoteEvent = game:GetService("ReplicatedStorage").PlaceHuman
local Cursor = game:GetService("Players").LocalPlayer:GetMouse()
script.Parent.MouseButton1Click:Connect(function()
if Value1.Value == true then
Cursor.Button1Down:Connect(function()
while true do
wait(0.5)
if Value1.Value == true then
RemoteEvent:FireServer(Cursor.Hit.p) -- Hit is the CFrame, p is the Vector3 translation
else
print("cannot complete task")
end
end
end)
end
end)
Server script:
local Number = 1
local RemoteEvent = game:GetService("ReplicatedStorage").PlaceHuman
RemoteEvent.OnServerEvent:Connect(function(Player, CursorPos) -- Passed Vector3
local block = game.ReplicatedStorage.Blocks.NPC:Clone()
block.Parent = workspace
block.Name = Player.Name.. " 's " ..Number + 1 .. "NPC"
block:SetPrimaryPartCFrame(CFrame.new(CursorPos))
end)
Please help!

9 comments
Sorry, I was impatient
No, my apologies, I didn't notice you had asked another question, it didn't go to my inbox, let me try to fix the problem
Could you tell me what Value1 looks like? I can also help you either use keystrokes for activating build mode or a GUI if that's what you'd like?
My goal was to make it where you could go into place mode or non-place mode, where you could use items and do non-build stuff, maybe even have a move and resize tool, value I is placed inside the player
value 1 is also a bool value inside the player inside the Players tab.
hello @feahren have you got a response? Sorry, for the last question, but I just told you what Value 1 is.
Are there any errormessages?
No, I dont believe so. Nope.
HELLo anybody gonna reaspond