I have a game where the data value's are transferred to another game. So my question is that when a player joins and if one of their values is 1, how would i clone something towards the player? Should i use :
LocalScript:
local Hair1 = game:GetService("ReplicatedStorage").Events:FindFirstChild("Hair1")
game.Players.PlayerAdded:Connect(function(player)
repeat until player.Data:wait()
if player.Data.Hair.Value == 1 then
Hair1:FireServer
end
end)
Server Script:
local Hair1 = game:GetService("ReplicatedStorage").Events:FindFirstChild("Hair1")
Hair1.OnServerEvent:Connect(function(player)
--clone's hair to player
end)

2 comments
Thank's for the info, could you update the script showing an example of using an OnClinetEvent
Sure!