If you are waiting until the tween makes the parts touch, then you could just wait until the tween ends like this:
Tween.Completed:Wait()
If you are waiting until the tween makes the parts touch, then you could just wait until the tween ends like this:
Tween.Completed:Wait()
I tried that before, it doesn’t seem to work for some reason.
Can you show me where you are putting it in your script?
Tween.Completed:Wait()
if Part.Touched then
Right.Visible = true
Main.Visible = true
end
end)
I tried to place it here basically.
Try this:
Tween.Completed:Wait()
Right.Visible = true
Main.Visible = true
end)
Touched is “an event only fires as a result of physics movement, so it will not fire if the CFrame property was changed such that the part overlaps another part. This also means that at least one of the parts involved must not be BasePart.Anchored
at the time of the collision.”
You can’t do .Completed like that.
https://developer.roblox.com/en-us/api-reference/event/TweenBase/Completed
I tried unanchoring the part and adding this to the script. It still dosen’t work.
Ah yes that is correct. 30char
Tween.Completed:Connect(function(playbackState)
if playbackState == Enum.PlaybackState.Completed then
Right.Visible = true
Main.Visible = true
end
end)
I added it, it still doesn’t seem to work. Do you think the problem is where I placed the script?
Part.Workspace:GetPartsInPart(function()
Right.Visible = true
Main.Visible = true
end)
I added it, but it still doesn’t work.
That’s not how it’s used.
local Parts = workspace:GetPartsInPart(Part)
https://developer.roblox.com/en-us/api-reference/function/WorldRoot/GetPartsInPart
@Forummer’s reply would work in this way:
local PartsInPart = workspace:GetPartsInPart(Part)
for i, part in pairs(PartsInPart) do
if part.Name == "whatever the name is" then
Right.Visible = true
Main.Visible = true
end
end
I tried it, it still doesn’t work.
Do you think the problem is where I placed the script?
Can you show me where you placed the script?
I ended up placing it in StarterCharacterScripts.
If you put it there then it is parented to the players character and if the player dies then it will be deleted. I would put it in StarterGui.
local Right = game.StarterGui.View.ViewRight
local Main = game.StarterGui.View.MainView
Well this isn’t affecting the player… So put it in StarterGui and do this:
local Right = script.Parent.View.ViewRight
local Main = script.Parent.View.MainView
Alright, I tried it and it still doesn’t work.
Ok well I don’t see an issue so if you’re comfortable with it, could you provide a place file? I will get back to you as soon as I can.