|
| 13 Aug 2015 05:09 AM |
A week ago I couldnt find out why aren't scripts chaning ShirtTemplate assets, then I used a LocalScript and it worked. But just now I found out that LocalScript only works for the LocalPlayer, in fact, the asset doesnt even actually change in the server! The texture does change but only for the LocalPlayer! Like when Player1 sees he himself as wearing a shirt with the asset http://roblox.com/asset/?id=3039068 then the other players still see him wearning a shirt with the template of http://roblox.com/asset/?id=144076357 (Which everyone spawns with!) and when I printed the asset it said the same template as others saw me with! When I used the exact same script with a normal script IT ABSOLUTELY DOES NOTHING!
while wait (0.2) do local pla = game.Players:FindFirstChild(script.Parent.Name) if pla ~= nil then local sh = pla.Character:FindFirstChild("sark") if sh ~= nil then if pla.ShirtValue.Value == 0 then sh.ShirtTemplate = " " end if pla.ShirtValue.Value == 1 then sh.ShirtTemplate = "http://roblox.com/asset/?id=3039068" end if pla.ShirtValue.Value == 2 then sh.ShirtTemplate = "http://roblox.com/asset/?id=144076357" end if pla.ShirtValue.Value == 3 then sh.ShirtTemplate = "http://roblox.com/asset/?id=25158587" end end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Aug 2015 05:45 AM |
| Actually when a player respawns the script is cloned into the character, the script is disabled but the cloned one when the parent already is the player's character isnt. |
|
|
| Report Abuse |
|
|
membra
|
  |
| Joined: 14 Oct 2008 |
| Total Posts: 6313 |
|
|
| 13 Aug 2015 06:51 AM |
Do it inside of a server script. Changes made by the client will not be replicated if FE is on.
[i like rhubarb] |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 07:19 AM |
| Sorry, i'm a begginner in scripting but whats an FE and a server script and a client? I checked the wiki about some client side scripting and server side scripting but didnt understand anything. I'm guessing the client is the player and his computer screen and server is the global thing that everyone in the server is affected by right? |
|
|
| Report Abuse |
|
|
Eauz
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 2942 |
|
|
| 13 Aug 2015 07:21 AM |
| game.Workspace.FilteringEnabled = false. |
|
|
| Report Abuse |
|
|
Eauz
|
  |
| Joined: 23 Jul 2013 |
| Total Posts: 2942 |
|
|
| 13 Aug 2015 07:22 AM |
| Or just to Workspace, look for the property "FilteringEnabled" and untick it. |
|
|
| Report Abuse |
|
|
| |
|