So where do I put the script… is it a localscript, or a script?..
Here you go, changes on touching a part. This is a server script.
So this goes into ServerScriptService as a Script? Correct?
Yes, ServerScriptService folder.
For the Touched one, do I also have to put that for the second world too? What do I do there, I am a bit lost
Do you even understand all the parts of the script?
It just seems like you’re just copying and pasting the script without any ideas how it work.
It’s really simple to add different worlds.
local players = game:GetService("Players")
local snowWorldPart = workspace:WaitForChild("SnowWorldPart")
local grassWorldPart = workspace:WaitForChild("GrassWorldPart")
players.PlayerAdded:Connect(function(player)
local world = Instance.new("StringValue")
world.Name = "World"
world.Value = "Tutorial" --default world is tutorial mode
world.Parent = player
player.CharacterAdded:Connect(function(character)
local playerWorld = player:WaitForChild("World")
if playerWorld.Value == "Tutorial" then
player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("Frame"):WaitForChild("ImageLabel").Image = "" --some image
elseif playerWorld.Value == "Snow" then
end
end)
end)
snowWorldPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
local player = players:GetPlayerFromCharacter(hit.Parent)
local worldStat = player:WaitForChild("World")
worldStat.Value = "Snow"
player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("Frame"):WaitForChild("ImageLabel").Image = ""
end
end)
grassWorldPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
local player = players:GetPlayerFromCharacter(hit.Parent)
local worldStat = player:WaitForChild("World")
worldStat.Value = "Grass"
player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("Frame"):WaitForChild("ImageLabel").Image = ""
end
end)
Honestly, if you’re struggling with this, you should probably just take on a less demanding project(s).
You’re just giving him free scripts to copy and paste. You should at least try teaching them.
It’s just that I need really good explanation to fully understand what you mean, and if I don’t I just get lost, and confused on what I am supposed to do if you know what I mean.
Okay, so you’re just giving him free scripts and not even trying to explain anything to him. Well done! I hope you truly help more people with this kind of attitude and let them feel how someone who doesn’t have good knowledges in scripting feels.
You shouldn’t script this anyway assuming that you just started scritping. You shouldn’t rush yourself to learn things quick.
knowledges
Anyway, I’m just not someone who enjoys teaching.
So why even help them? If you’re just gonna give an entirely free script with no explanations, how can they improve?