adeep
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 274 |
|
|
| 04 Mar 2016 09:43 PM |
I want to make an object turn cancollide on for some but have it off for others. Pretty much I want little joey to beable to walk threw a block but not allow lil zack to do it. I dont want to make the doors cancollide property to change universally tho. I dont want it to kill and I don't want it to telleport them. I simple want it to disallow movement in that direction on the block. |
|
|
| Report Abuse |
|
|
|
| 04 Mar 2016 09:43 PM |
That's when the Wiki comes in play buddy.
Ignorance at its finest. |
|
|
| Report Abuse |
|
|
adeep
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 274 |
|
|
| 04 Mar 2016 09:45 PM |
I don't know what to look for in wiki. Cus I mean I'm over he looking for the answer but I can't find anything but changing the property universally.
|
|
|
| Report Abuse |
|
|
|
| 04 Mar 2016 09:49 PM |
| Make the object cancollide on the clients who you want to be able to walk through it. Clientside, not serverside, and enable FE so it doens't replicate. |
|
|
| Report Abuse |
|
|
adeep
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 274 |
|
|
| 04 Mar 2016 09:50 PM |
| That's what I'm trying to do but I don't know what to use to make it only clientside considering I tried local scripts. And what's "FE" |
|
|
| Report Abuse |
|
|
| |
|
adeep
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 274 |
|
|
| 04 Mar 2016 10:00 PM |
I have it Enabled and still no response when I put this code into a local script rather than a regular script
Code-
--Variables-- parent = script.Parent plot = script.Parent.Parent
-- Code -- parent.Touched:connect(function(hit) print(hit.Name) if game.Players:FindFirstChild(hit.Parent.Name):FindFirstChild("leaderstats") ~= nil then print(plot.Name.." has been touched by "..hit.Parent.Name) parent.CanCollide = true end end)
|
|
|
| Report Abuse |
|
|
|
| 04 Mar 2016 10:07 PM |
LocalScripts don't run from Workspace. They have to be in the player's character or StarterGUI/Starterpack
|
|
|
| Report Abuse |
|
|
adeep
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 274 |
|
|
| 04 Mar 2016 10:08 PM |
| God I'm dumb. I knew that XD. Thanks man. |
|
|
| Report Abuse |
|
|
adeep
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 274 |
|
|
| 04 Mar 2016 10:21 PM |
So now I ran into another issue. How do I use that local script to work client side but also beable to work with the server to allow other to gain access the the door?
Code-
--[[ THIS REGULATES WHO CAN HAVE ACCESS TO THE CURRENT PLOT --]]
--Variables-- plotNumber = script.Plot.Value plot = nil
for i = 1, #game.Workspace.Plots:GetChildren() do --Finds Plot player owns if game.Workspace.Plots:GetChildren()[i].PlotNumber.Value == plotNumber then plot = game.Workspace.Plots:GetChildren()[i] end end
plotRegulator = plot["PlotRegulator"]
-- Code --
plotRegulator.Touched:connect(function(hit) print(hit.Name) if game.Players:FindFirstChild(hit.Parent.Name):FindFirstChild("leaderstats") ~= nil then print(plot.Name.." has been touched by "..hit.Parent.Name) plotRegulator.CanCollide = true end end)
|
|
|
| Report Abuse |
|
|
|
| 04 Mar 2016 10:46 PM |
| Wait, I thought FE disables local scripts.... or am I just tired? |
|
|
| Report Abuse |
|
|