|
| 13 Nov 2014 10:05 PM |
Ok So I have a door script that you can click to open and close. What can I do to make the script make sure only the owner of the tycoon can click the door? Here is the setup of the tycoon in the explorer.
Tycoon Tycoon (string value)OwnerName (string value)Price (model)Buy tycoon (model)Tycoon owner:Nobody (part)Door Click Detector Script
Again, this is what I'm askng: How can I make the Door only open if the Owner Clicks it?
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 13 Nov 2014 10:07 PM |
| Check if the OwnerName.Value is the same as the person who touched it |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 15 Nov 2014 10:20 AM |
| Ok, how do I do that? I'm not really an expert at scripting. |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2014 10:28 AM |
here's my script so you can see how the scripting needs to be integrated.
local isOn = true
function on() isOn = true script.Parent.Transparency = 0 script.Parent.CanCollide = true end
function off() isOn = false script.Parent.Transparency = .5 script.Parent.CanCollide = false end
function onClicked(hit) if isOn == true then off() else on() end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
on()
|
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Nov 2014 11:49 AM |
| Using crazyman's script. You'll have to edit it a lot. |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2014 07:33 PM |
| Would it be easier to get an experienced scripter to script it for me? |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2014 09:21 PM |
| Bump. So, basically, I need help integrating the owner check into my script. Please help! |
|
|
| Report Abuse |
|
|