Not to sure whats happening with my code I've tried using a variable and that too didn't work. Its a season changer that changes the mesh's texture id to make the mesh appear different for a certain season. Heres my code:
if script.Summer.Value == true then
script.Parent:GetChildren().Mesh.TextureId = "http://www.roblox.com/asset/?id=32323659"
elseif script.Fall.Value == true then
script.Parent:GetChildren().Mesh.TextureId = "http://www.roblox.com/asset/?id=100779383"
elseif script.Winter.Value == true then
script.Parent:GetChildren().Mesh.TextureId = "http://www.roblox.com/asset/?id=65612688"
end
I have 3 Bool Values inside the script named Summer,Fall, and Winter
I'm getting the error: Workspace.Trees.Script:6: attempt to index field 'Mesh' (a nil value)
Please help
