Fout = 2 Flag = game.ServerStorage.Flag Giver = game.Workspace.FlagGiver function giveFlag(part) local parent = part.parent if game.Players:GetPlayerFromCharacter(parent) and Fout == 2 then local OPFlag = Flag:Clone() OPFlag.Parent = workspace OPFlag.Position = -- What I need help on. Fout = 1 end end Giver.Touched:connect(giveFlag)
I'm planning to connect the item to the player with a weld once it's been spawned in, though if anyone has a better pay of doing that it'd also be greatly appreciated, but the main part is getting is to spawn in at the players position, help please?
I HOPE THIS HELPS!!!! :
Fout = 2 local Flag = game.ServerStorage.Flag -- i would use a local JIC local Giver = game.Workspace.FlagGiver local Position = Character.HumanoidRootPart.Position function giveFlag(part) local parent = part.parent if game.Players:GetPlayerFromCharacter(parent) and Fout == 2 then local OPFlag = Flag:Clone() OPFlag.Parent = workspace OPFlag.Position = Position -- What I dont need help on anymore Fout = 1 end end Giver.Touched:connect(giveFlag)