My model placement system is not working, it clones the model but doesn't move?(read desc)
(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
GIF of the placement system
Replicated storage(Ignore "changebuilding")
SERVER SCRIPT
01 | local place = game:GetService( "ReplicatedStorage" ).Placement.Remotes.Place |
04 | game.ReplicatedStorage.Placement.Remotes.Place.OnServerEvent:Connect( function (plr, building, position) |
07 | local building 2 = building:Clone() |
08 | building:MoveTo(position) |
09 | building.Parent = workspace |
LOCAL SCRIPT
01 | local player = game:GetService( "Players" ).LocalPlayer |
02 | local mouse = player:GetMouse() |
03 | local UIS = game:GetService( "UserInputService" ) |
05 | local activekeycode = Enum.KeyCode.E |
06 | local event = game:GetService( "ReplicatedStorage" ).Placement.Remotes.Place |
07 | local changeevent = game:GetService( "ReplicatedStorage" ).Placement.Remotes.ChangeBuilding |
08 | local currentbuilding = game:GetService( "ReplicatedStorage" ).Placement.Buildings.Model |
21 | mouse.Button 1 Down:Connect( function () |
25 | local building = currentbuilding |
26 | local position = mouse.Hit.p |
27 | event:FireServer(building, position) |
33 | changeevent.OnClientEvent:Connect( function (building) |
34 | if not active and building ~ = currentbuilding then |
35 | currentbuilding = building |