I’m making a game where you can swap yourself with yourself in the mirror.
I’m getting an error saying
However, I am here.
How do I fix this? I’ve tried WaitForChild. Still doesn’t work, with an infinite yield error.
I’m making a game where you can swap yourself with yourself in the mirror.
I’m getting an error saying
However, I am here.
How do I fix this? I’ve tried WaitForChild. Still doesn’t work, with an infinite yield error.
Can you show me the script please?
Which script?
is cycl5rob inside the players model made by a localscript or a serverscript
The proximity part script please.
script.Parent.Triggered:Connect(function(player)
if player.Character == workspace[player.Name] then
player.Character = workspace.Mirror_Model.Players[player.Name]
else
player.Character = workspace[player.Name]
end
end)
Line 3 is where it’s erroring.
Not sure, it’s one of these though.
Maybe try this?
local mirror = workspace:WaitForChild("Mirror_Model")
script.Parent.Triggered:Connect(function(player)
if player.Character == workspace[player.Name] then
task.wait (2)
player.Character = mirror.Players[player.Name]
else
player.Character = workspace[player.Name]
end
end)
Still getting the same error, but it’s on line 5 now.
Is this a local or server script? Because player can only be accessed from the server I believe.
I’m not exactly sure; the mirror is just a free model.
The mirror is a free model or the scripts?
The mirror has the scripts. Except for the proximityPrompt one though.
Can you give me the proximity part script please?
Oh I think it’s a localscript because the server script just gives the player the localscript.
script.Parent.Triggered:Connect(function()
local player = game.Players.LocalPlayer
if player.Character == workspace[player.Name] then
player.Character = workspace.Mirror_Model.Players[player.Name]
else
player.Character = workspace[player.Name]
end
end)
You already asked for it earlier.
local mirror = workspace:WaitForChild("Mirror_Model")
mirror.Triggered:Connect(function(player)
if player.Character == workspace[player.Name] then
player.Character = mirror.Players[player.Name]
else
player.Character = workspace[player.Name]
end
end)
Models do not have a triggered event-
oh it was a model… my bad. How come the script has script.Parent.Triggered then