amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 04 Feb 2015 08:50 PM |
I can make a VIP door script
on touch connect blah if player if player is admin make part not cancollide else kill player end end end
however, i don't want anyone to die in my game, and if it doesn't kill then people can get in when someone else touches the door.
I also do not want to do anything that bounces players back because that will take away from gameplay.
Is there a feasable way to go about making a door that simply some people can pass through, but others do not have the ability to, and acts as a wall for them?
I don't need anyone to write me code for this, I just want to know:
1. is it possible 2. how do i start figuring out how to do it
links are appreciated if necessary |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2015 08:53 PM |
Well, you could, with FilteringEnabled, change CanCollide = false on that specific player's client using a RemoteEvent/RemoteFunction. Therefor, that player could go through, but others could not.
That is because it changes the CanCollide just on their client - and not the server or other clients. |
|
|
| Report Abuse |
|
|
Lecturous
|
  |
| Joined: 17 Aug 2013 |
| Total Posts: 1096 |
|
|
| 04 Feb 2015 08:53 PM |
on touch connect blah if player if player is admin make part not cancollide else return end end end |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2015 08:54 PM |
I know that in Loleris' The Mad Murderer, the VIP door only allows people who own the gamepass to fall through the door and everyone else stands above it.
I'm sorry, but I don't know how to do it :( |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 04 Feb 2015 09:03 PM |
local parts sounds like my best bet, like u said with filtering enabled
idk
i've never used filtering enabled before and i'm reading up on it and it's saying i can't communicate with the server or something so i have to use replicated storage and all these other things
and i'm afraid if i do it, it will be hard to work around with everything else? |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2015 01:29 AM |
Teleport them to the other side of the door...?
Or use local parts.
And no matter what you should always be using FilteringEnabled. Yes, it's going to be annoying to migrate it, and yes, it's important to use. |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 05 Feb 2015 01:32 AM |
"And no matter what you should always be using FilteringEnabled."
That box has been unchecked as long as it's been on my Studio. I don't click buttons that I'm not fully educated about. "It's important." isn't good enough for me. I'm researching now and then, but I'm not publishing any game quite yet so I'm sure it doesn't matter too much until then. |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2015 01:49 AM |
Put this script in a brick with CanCollide set to false.
See if this works.
script.Parent.Touched:connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr.Name == 'amanda' then print 'valid' else hit.Parent:BreakJoints() end end end) |
|
|
| Report Abuse |
|
|
|
| 05 Feb 2015 01:51 AM |
Oh, I didn't see the doesn't want to kill sentence.
Try this.
function keepout(a) script.Parent.CanCollide = true a.TouchEnded:connect(function() script.Parent.CanCollide = false end) end
script.Parent.Touched:connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then local plr = hit.Parent if plr.Name ~= 'amanda' then keepout(part) end end end)
|
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 05 Feb 2015 02:09 AM |
@Original need
"VIP Door script that doesn't kill?"
:LoadCharacter() |
|
|
| Report Abuse |
|
|