Basically my game has FilteringEnabled on (have not used this before) and I need to show a model only to the player when they join...
I've come up with this in a local script, inside *StarterPlayerScripts * under StarterPack. It works in normal studio test mode yet when I start a Test Server only the player's name is printed and nothing gets moved....
local player = game.Players.LocalPlayer if player.Name == "Player1" or player.Name == "Player" then print(player.Name) local clone = game.ServerStorage.ShipModel:Clone() clone.Parent = game.Workspace print("Cloned and moved") end
Any help is appreciated, thanks :)
This is because local scripts cannot access game.ServerStorage
For more information on LocalScripts please visit this link.
So if you want the model to only be viewed by the player them selves. im sure you can do that with FE, but your better off putting it in the players camera by doing the following:
local player = game.Players.LocalPlayer if player.Name == "Player1" or player.Name == "Player" then print(player.Name) game.ReplicatedStorage.ShipModel:Clone().Parent = game.Workspace.CurrentCamera print("Cloned and moved") end
You should have used Replicated storage, you used server storage
local clone = game.ServerStorage.ShipModel:Clone()
And camera is a good way to keep things local.