-
What do you want to achieve? Make a part be the parent of the player.
-
What is the issue? The part spawns at a random place of the map instead the player’s character and i don’t know how to fix this.
-
What solutions have you tried so far? I tried to anchor the part but it din’t worked.
Script:
local event = game.ReplicatedStorage:WaitForChild("PartEvent")
event.OnServerEvent:Connect(function(player)
local char = player.Character
local pt1 = Instance.new("Part",char["HumanoidRootPart"])
pt1.Name = "beam1"
pt1.Anchored = true
pt1.Transparency = 1
pt1.CanCollide = false
pt1.CanQuery = false
pt1.Size = Vector3.new(4, 1, 2)
pt1.Orientation = Vector3.new(0, 180, 40)
end)
Why the part spawns at a random place instead the player?