Troubles with door tweening

Scripting some doors to open whenever you get close to them but it does not work. Im getting no error messages anyone know why?

3 Likes

Hey there, you cannot compare hit parent wich is an character, with an player.
Replace line 9 with this if hit.Parent.Name == player.Name then

3 Likes

My tween is still not working and Im getting no error messages

1 Like

Also you shouldn’t edit Position but I’d rather recommend editing CFrame on line 11.

1 Like

I did that but its still not working

1 Like

My question is, is that an local script?

1 Like

Yes it is, am I misusing something that should not be in one?

1 Like

Well you cannot access that type of event with an LocalScript, you need to make an Script to make it ServerSided and if you want it to show for players only then use Server Script that fires the client when part is touched.

1 Like

I’ll try this out and mark this as the solution if it works

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.