Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trouble with Humanoids and stuff, can someone help?

Asked by 5 years ago
Edited 5 years ago

I cant find a way to set the position of the cube to the player's script.Parent.MouseButton1Click:Connect(function(player, Cube) `script.Parent.MouseButton1Click:Connect(function(player, Cube) game.Workspace.Cube.Position = game.Players.LocalPlayer.Character.Humanoid.Position + Vector3.new(0,0,15) end)

`

1 answer

Log in to vote
0
Answered by 5 years ago

Humanoids don't have a property called 'Position', you should instead find the characters HumanoidRootPart and then run that code.

Also, quick note: you need to utilize either RemoteEvents or RemoteFunctions to create this, it's not going to work in a game server because the cube's position will change only for the person who clicked the button, but for everyone else (the server) it will stay at the same spot.

0
How would i do that? Tacodragon777 -1 — 5y
Ad

Answer this question