ClickDetectors that change color on clicked >_>?
Offline
RockLee96 wrote:
You didn't really mention this and I've tried so much!
But what about this script, it turns the brick anchored, makes it's transparency to 0.2, then makes it a ball
script.Parent.Anchored = true
wait(1)
script.Parent.Transparency = 0.3
wait(1)
script.Parent.Shape = Ball --THIS IS THE PART THAT NEVER WORKS!!
The error there is that you must either specify a number (which numbered spot "Ball" is on the drop-down list) or a string.
Your script thinks that Ball is a variable.
Change Ball to "Ball" (put quotes around it -- then it'll work).
GiygasMaster761 wrote:
ClickDetectors that change color on clicked >_>?
function onClick() script.Parent.BrickColor = BrickColor.new(script.Parent.BrickColor.Number + 1) if script.Parent.BrickColor.Number > 50 then script.Parent.BrickColor = BrickColor.new(1) end end script.Parent.ClickDetector.MouseClick:connect(onClick)
Okay, basically what that script does is this: Whenever the brick in question is clicked, its color goes to the next value in the list of BrickColor values. The reference for BrickColor values can be found here. When the value gets larger than 50 it goes back down to the first value (white).
Simple enough, I hope?
(Oh, if you were talking about changing the cursor for ClickDetectors...can't do that, I'm afraid.)
Offline
Script wrote:
print("CFrame Elevator Script Activated")
while true do
Object1 = game.Workspace.CFrameElevator.Base
Object1.CFrame = CFrame.new(Vector3.new(0,10,0))
wait(30)
end
This Script is for a tele-elevator but the base of it teleports with out the rest of the elevator. I welded it all together and nothing seems to work. btw if the roof Is welded to the wall will it tele? If not I have another idea that should work.
I also need this script On Clicked if not, On touched. I'm making different locations for this elevator.
Thanks Bob
Offline
Is there a way for a script to choose a random person on each team and change there name to V.I.P
And how would I go about to make another script saying if V.I.P dies then regen map choose new V.I.P
Can you simplify the making a leaderboard that does this kill v.i.p gets 1 point
Offline
hawky076 wrote:
Script wrote:
print("CFrame Elevator Script Activated")
while true do
Object1 = game.Workspace.CFrameElevator.Base
Object1.CFrame = CFrame.new(Vector3.new(0,10,0))
wait(30)
endThis Script is for a tele-elevator but the base of it teleports with out the rest of the elevator. I welded it all together and nothing seems to work. btw if the roof Is welded to the wall will it tele? If not I have another idea that should work.
I also need this script On Clicked if not, On touched. I'm making different locations for this elevator.
Thanks Bob
Just a second while I test two different theories:
(A) Take out the Vector3.new part
(B) Create another Vector3.new part, separating the two by a comma
Kretin wrote:
Is there a way for a script to choose a random person on each team and change there name to V.I.P
And how would I go about to make another script saying if V.I.P dies then regen map choose new V.I.P
Can you simplify the making a leaderboard that does this kill v.i.p gets 1 point
Sure. What you'd want to do is check the TeamColor of each player [game.Players.PLAYERNAME.TeamColor = BrickColor.new()] and use the Color Reference to find what TeamColors you've got. Bright red equates to 21, Bright blue is 23. Other colors, you're best off using Find (CTRL + F) to find it in the list.
Once you find your colors, make a for loop to check each Player's TeamColor with an if statement. So a chunk of the code might look like this:
players = game.Players:getChildren()
for i = 1, #players do
if players[i].TeamColor == BrickColor.new(21) then --Comment: If on the Bright Red team...
--Another comment: Do stuff to the red team here.
end
endSo now that you can do stuff just to the Red team, put them all into a group. Erm, wait...I haven't covered that yet (it'll be in the fourth lesson when I get there). In the meantime I'll try to whip up that script when I'm not busy.
But essentially you'd group all the red players together in a temporary table, then select one of THOSE at random to be the VIP. You'd do something special to the VIP (such as inserting an IntValue into the player's Character) so that an "onDied" script can know for sure that the VIP was killed.
As far as editing the leaderboard goes, it'd require a tiny bit of work but it could also work off of that IntValue inserted earlier.
Offline
Thank you but how would I select one random person from the team. And how do i change a person name?
Offline
Changing their name is relatively easy.
game.Players.Kretin.Character.Name = "VIP"
Unfortunately, it's a bit harder to choose a random person on each team. I'll whip that script up sometime. Just know that it involves table.insert.
Offline
Thank you hopefully I will be around when you are done.
I devised my own demise
Offline
Finally started working on Lesson #3.
It's not done yet. I'm heading off to bed as it is 4 in the morning. Good night...morning...whatever. (Zzz...)
Offline
Lol, I was so happy the day I learned I could use ROBLOX as a caculator XD
Offline
Indexing is the part I never really got down...
Thanks, bob! This is excellent!

Offline
Heres My Script I made,
script.Parent.Anchored = true
wait(1)
script.Parent.Transparency = 1
wait(1)
script.Parent.Transparency = 0
wait(1)
script.Parent.Transparency = 0.1
wait(1)
script.Parent.Transparency = 0.2
wait(1)
script.Parent.Transparency = 0.3
wait(1)
script.Parent.Transparency = 0.4
wait(1)
script.Parent.Transparency = 0.5
wait(1)
script.Parent.Transparency = 0.6
wait(1)
script.Parent.Transparency = 0.7
wait(1)
script.Parent.Transparency = 0.8
wait(1)
script.Parent.Transparency = 0.9
--And BAM! Theres My Script--
Offline
Ths guide is great, I made some decent (well decent for me) scripts! like this:
x=5
while true do
script.Parent.Anchored = true
script.Parent.Transparency = .1
wait(.0001)
script.Parent.Transparency = .2
wait(.0001)
script.Parent.Transparency = .3
wait(.0001)
script.Parent.Transparency = .4
wait(.0001)
script.Parent.Transparency = .5
wait(.0001)
script.Parent.Transparency = .6
wait(.0001)
script.Parent.Transparency = .7
wait(.0001)
script.Parent.Transparency = .8
wait(.0001)
script.Parent.Transparency = .9
wait(.0001)
script.Parent.Transparency = 1
wait(.0001)
script.Parent.Transparency = .9
wait(.0001)
script.Parent.Transparency = .8
wait(.0001)
script.Parent.Transparency = .7
wait(.0001)
script.Parent.Transparency = .6
wait(.0001)
script.Parent.Transparency = .5
wait(.0001)
script.Parent.Transparency = .4
wait(.0001)
script.Parent.Transparency = .3
wait(.0001)
script.Parent.Transparency = .2
wait(.0001)
script.Parent.Transparency = .1
wait(.0001)
script.Parent.Transparency = 0
end
Offline
Oh, don't worry. I'll be finishing it up soon enough. I think I'll go do that now, actually.
Offline
Thanks for the lessons!
I made this script with my newfound knowledge.
t = 1
while true do
wait(0.2)
script.Parent.BrickColor = BrickColor.new(t)
print(script.Parent.BrickColor)
print("-----------------------------------------")
t = t + 1
endafter a while, it just repeats Medium Stone Grey... ill try and fix that so it loops.
Last edited by latiosslayer (2008-12-20 3:04 PM)

Offline
while true do for i = 1, 20 do script.Parent.Size = Vector3.new(i, i, i) script.Parent.Transparency = i / 20 script.Parent.CFrame = script.Parent.CFrame wait(0.1) end wait(0.1) end

Offline
Well, next up is for me to add to the given scripting problem to include uses for "and", "or", & "not".
I'll do that later.
Offline
Might i bump?
game.Workspace:InsertContent(URLHERE)
Offline
Wait, so I how could I specify all of the bricks in the model in a script?
Offline
RinKaenbyou wrote:
Might i bump?
Code:
game.Workspace:InsertContent(URLHERE)
Wait a minute...
How the hell do you know about scripting?
Offline
Charcermanter wrote:
RinKaenbyou wrote:
Might i bump?
Code:
game.Workspace:InsertContent(URLHERE)Wait a minute...
How the hell do you know about scripting?
I read, unlike you.
Offline
RinKaenbyou wrote:
Charcermanter wrote:
RinKaenbyou wrote:
Might i bump?
Code:
game.Workspace:InsertContent(URLHERE)Wait a minute...
How the hell do you know about scripting?I read, unlike you.
Uh.. I just posted without seeing the thread name.. Sorry >_>
Offline
Can anyone help me?
>_>
I made thread but I lost it. ._.
To do it, don't I have to find the model's children?
Offline