Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What to do for Script Properties?

Asked by 10 years ago

So I want to know how to get a script to access it's properties.. Like behaviour. So would I do script.Disable? And then like do script.Disable = true After a certain statement has come true?

So I've done something like this:

admin = {"MasterPoke99"}


game.Players.PlayerAdded:connect(function(p) 
for _,v in pairs(admin) do if p.Name:lower() == v:lower() then p.Chatted:connect(function(m)  
m = m:lower()

tele = script.Parent enable = script.Parent.Teleport 

if m == "open sft" or "open secret" or "open teles" or "close arena" or "open vote" then wait(1) 

tele.Transparency = 1 
tele.CanCollide = false 
script.Disabled = true 

elseif m == "Self-Training" then 
wait(1) tele.Transparency = 0 
tele.CanCollide = true 
script.Disabled = false -- Now changed, beforehand it was script.Disable which was wrong.

end end) end end)

But at the end where it says 'end end) end end) It keeps coming up with errors. Could someone expand what is going wrong and why... I thought it was the properties where I say script.Disable... I might be wrong but could someone help me solve it? Thanks.

So I looked at this again and noticed that the end end) end end) is talking about line 4... What's wrong with it? If nothing then what? Because it keeps saying there's an unexpected symbol near ')' But if I delete it, it says it's expected to close line 4 at the end... But if I don't delete and add a ')' at the end of line 4 it says what it used to say at end end) end end) but instead up there... Would really appreciate some help...

1 answer

Log in to vote
0
Answered by 10 years ago

Hi MasterPoke99,

Your only error in the code was at like 19, you put

script.Disable = false

When really you should fix it by doing

script.Disabled = false

Hope I helped!

0
Oh Okay. I'll try that. Thanks. I'll tell you if it worked. DerpyShadowz 34 — 10y
0
Okay so I've changed that... But the 'end end) end end)' says there is an unexpected symbol near ')' - But I'm confused... If I delete it, it's expected to close the lines above... But at least you've narrowed it down one. DerpyShadowz 34 — 10y
0
Not sure if this will work, but keep changing which ones have the bracket at the end like "end)". blockhaak2 1 — 10y
Ad

Answer this question