|
Hello ! I am creating a game and I would like to make the Skybox change when Walking on a "part". But, I would like the Skybox change only for the player who walk on the part.
I made a lot of research, I really don't know how I can script that out, if someone could help me, I would really appreciate!
Thanks =D |
|
|
him. Go into tool box and paste a weapon. In the scripting, there should be code for what happens when a person touches the blade. Reverse engineer that script so it can detect if someone touched your box |
|
|
Thanks for your help, But I'm talking about making the sky change for a player that just walk on a part.
Sorry if I wasn't clear |
|
Denny9876Join Date: 2012-10-19 Post Count: 117 |
Put this script in the part :
local skybox = script.SKYBOXNAMEHERE
script.Parent.Touched:Connect(function(touchedpart)
skybox.Parent = game.Lighting
script:Destroy()
end)
Then get a skybox and put it in the script.
When something touches the part, the skybox will move into the lighting property and the skybox will change.
This affects everyone too I think, not just 1 player. |
|
|
Thank you, Its working!! The only thing, its that I would like the skybox to change only for the player who touched the part...
thanks for your help, I really appreciate |
|
|
--put script in starterplayer.starterplayerscripts
skybox = script.SKYBOX
workspace.Part.Touched:connect(function()
skybox.Parent = game.Lighting
end) |
|
Denny9876Join Date: 2012-10-19 Post Count: 117 |
You'll probably have to turn on FilteringEnabled (In workspace properties) if you want it to change only for the player.
I'm too lazy to do it though as it takes more work to do it. Try learning yourself, or wait for someone to help. |
|
|
Thanks Denny for your help ! Really appreciate !
|
|
|
Hi ! first of all, thanks for helping me. I want you to know that I really appreciate your help.
I would like to know, when you are talking about "put script in ..." I had put your script in my part and the skybox I want in your script. So do I put the Part (with the script in) in starterplayer.Starterplayerscripts or I put only the script in starterplayer.starterplayerscripts ?
Sorry if this is a stupid question...
Thanks for your help! |
|
Denny9876Join Date: 2012-10-19 Post Count: 117 |
StarterPlayerScripts are only meant to be for scripts only, so don't put the part in, just the script.
I don't think you should directly take the code and use it on StarterPlayerScripts though, as it's supposed to work on a part. Try changing the script a little.
By the way, I don't have lots of knowledge about StarterPlayer with FE. So in case you need help on something related to that, I won't have much to say. Just use the wiki or ask someone else for help. :P |
|
|