I’m trying to make it so whenever you click on a button a new part is created in workspace and the position of the part is the position of the player, it captures the position but does not put the part to the position. Please help
local Replicated = game.ReplicatedStorage
local EventsFolder = Replicated.EditingEvents
local PartsFolder = Replicated.Parts
local SyncedPartNames = EventsFolder.SavedPartNames
local player = game:GetService("Players").LocalPlayer
local Players = game.Players
local WarnTime = 1
local HumanoidPosition = game.ReplicatedStorage.PlayerSettings.PlayerPosition.Value
PlayerName = player.Name
script.Parent.MouseButton1Click:Connect(function()
local PartClone = PartsFolder.Part:Clone()
PartClone.Parent = game.Workspace
PartClone.Position = Vector3.new(HumanoidPosition)
PartClone.Anchored = true
PartClone.CanCollide = false
wait(WarnTime)
PartClone.CanCollide = true
end)
while wait(0.001) do
for i,v in pairs(Players:GetChildren()) do
local HumanoidPos = game.Workspace:WaitForChild(v.Name).HumanoidRootPart.Position
game.ReplicatedStorage.PlayerSettings.PlayerPosition.Value = HumanoidPos
end
end
robloxapp-20230114-1902258.wmv (1.4 MB)