player = game.Players.612004
character = player.Character
hmndrootpart = character:FindFirstChild(“HumanoidRootPart”)
workspace.Spot.BodyGyro.CFrame = workspace.Spot.CFrame
while true do
workspace.Spot.BodyGyro.CFrame =
CFrame.new(workspace.Spot.Position, workspace.oof.Position)
wait(1)
end
This is my code what would I need to change for it to work
Please give us more information, I don’t know what the problem is.
Are there any errors in the console/output?
Also, please use 3 tick marks like this: ```
to make a Lua code block:
hello there
Have you tried any solutions to your problem already?
their not an error I want to have it do something else instead of when the named player is their it the person that is closet to it.
Would I use a math.random event
I’m not a scripter so I can’t help you, but I can help you with this. No one knows what you’re asking for. The title gives almost no info. Explain what the system is/will do.
Are you asking for the script to do the same behavior on nearby players? Players that are nearby to what exactly?
However, what you’re probably after is some sort of distance calculation like checking for the players that are within a Region3 or calculate the magnitude between the players to the part. If possible, you could activate the distance calculation when a player touches the base part (the floor) in whatever area you want the detection to happen at.
Here are some useful sources:
The light is shining on the stage at the closet person is what I want