So im trying to make it so whenever you click on a button a part appears and its position is where the humanoids position is, which works. But I want it to be smooth and perfectly on the ground.
Heres my script.
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
local Character = player.Character
game.Players.PlayerAdded:Connect(function()
local FindCharacter = game.Workspace:FindFirstChild(player.Name)
if FindCharacter then
FindCharacter.CanCollide = false
else
warn("Cant find the players character :o So bad :::((((")
end
end)
script.Parent.MouseButton1Click:Connect(function()
local PartClone = PartsFolder.Part:Clone()
PartClone.Parent = game.Workspace
PartClone.Position = Character.HumanoidRootPart.Position
PartClone.Anchored = false
wait(WarnTime)
PartClone.CanCollide = true
PartClone.Anchored = true
end)
But it does not layout how I want it to.