#again i guess

1 messages · Page 1 of 1 (latest)

uneven geyser
#

The wood should be in the center

#

And the players should move themselves to be 3 studs within the wood

uneven geyser
#

On the video did not looks like the center

#

Well the door should be in the center and the players should be able to have around a 3 stud margin from the edge

#

And if they are outside that margin teleport them back into that margin

#

Yes because when the server updates the plank to the center

#

That character might go outside the 3 stud limit and update there own position

#

Causing them to move towards the plank

#

You could make it on the client side

#

Server side might be easier for you

#

You could make it 100% client sided

#

But just make it work first then worry about that

uneven geyser
#

No

uneven geyser
#

Is your 3 stud margin from the edge or center of the plank

#

OK because I don't see the player being able to walk a little away from the plank

#

When falling looks like your teleporting them right back to the edge

#

Not to be within 3 studs

#

See how you can move forward and back a little

#

Yours needs to do the same

uneven geyser
#

Don't give up your close

uneven geyser
#

I already told you want you need to do its actually very simple

#

Show me the part of the code where if the player is more then 2 studs away you teleport them back

#

OK so first you would have 2 attachments inside the part

#

One on one side and one on the other side

#

Then you get the distance to that attachment

#

Then you do

#
local direction = attachment.WorldPosition - player.Position

local deltaDistance = direction.Magnitude - allowedDistance

If deltaDistance > 0 then
    player.CFrame += direction.unit * deltaDistance
end
uneven geyser
#

Now you need to ask yourself why could you not do it

#

Where did you go wrong

#

Why did you do it wrong

#

Why does mine work

#

What does mine do differently then yours

#

Look at my code and see why it works

#

What part of my code is complex maths that you can't understand

#

Delta = difference

#

The names of the variables are not important

#

You can name them pp po po if you like

#

But what is the code doing?

#

What does it do that's yours never did

#

That's one of the mistakes

#

How was yours set wrong