(I had to shorten the title because of the stupid 100 char limit)
Hello! I'm having some troubles with my model placement, it clones the model but doesn't move it until you click again. AND doesn't clone another part. Help would be appreciated
FYI: I'm using remote events
Replicated storage(Ignore "changebuilding")
SERVER SCRIPT
local place = game:GetService("ReplicatedStorage").Placement.Remotes.Place
game.ReplicatedStorage.Placement.Remotes.Place.OnServerEvent:Connect(function(plr, building, position)
local building2 = building:Clone()
building:MoveTo(position)
building.Parent = workspace
end)
LOCAL SCRIPT
local player = game:GetService("Players").LocalPlayer -- Define the player
local mouse = player:GetMouse() -- Define the mouse
local UIS = game:GetService("UserInputService") -- UIS for activate of placement
local active = true -- Is placement active?
local activekeycode = Enum.KeyCode.E -- When the player presses E, they start placement.
local event = game:GetService("ReplicatedStorage").Placement.Remotes.Place
local changeevent = game:GetService("ReplicatedStorage").Placement.Remotes.ChangeBuilding
local currentbuilding = game:GetService("ReplicatedStorage").Placement.Buildings.Model
--UIS.InputBegan:Connect(function(input, gp) Not in use
--if input == activekeycode and gp and active then
--active = true
--else
--active = false
--end
--end)
mouse.Button1Down:Connect(function()--Start the placement
--if active then -- Ensure it is active
print("Activated")
local building = currentbuilding
local position = mouse.Hit.p -- Don't know if i should use "mouse.Hit.p" or "mouse.Hit"
event:FireServer(building, position)
--end
end)
-- IGNORE THIS!!!!!!!!!!!!!!!!!
changeevent.OnClientEvent:Connect(function(building)-- Change building
if not active and building ~= currentbuilding then -- Ensure it is not active
currentbuilding = building
end
end)

5 comments
I made my placement system neater by using TweenService:Create() and cancelled the tween every time the mouse moved..!! Also I used mouse.Hit.p
I'll probably end up using Tweens when i get it somewhat setup.
Oh also, use :GetTouchingParts for collisions and raycasting for when the model goes outside the boundaries!
Gonna have to use that to.
Just going to say this: if you plan to do something in the future that changes your whole system because you think it will make it cleaner, it is better to do it sooner rather than later or else your future self will hate you.