Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Morph Assignated Night Vision Goggles and Spawning Problem: May you help?

Asked by 5 years ago
Edited 5 years ago

So I have this In-Game Morph GUI that works in-game and ROBLOX studios. And I have two problems:

1) Not really a problem but.

I want a morph assigned night vision goggle that when you press a KeyDown event, it'll make it night vision, that said, i'm not all experienced in scripting at all. I don't want it assign to every player. Only the person wearing that specific morphs.

(If your wondering what type of morphs, my group is a Republic Clone Army)

2) In my group game. I have this PlayerEntered script that shows a cutscene on the team selection. When I press the "REPUBLIC" team, the cutscene is destroyed and opens the Morph GUI. But when I press the other team, or in this case, CIS, it removes the team selection, teams the player and respawns, but the cutscene gui doesn't go away until a while.

Which means I need someone to provide a script that can destroy the cutscene when someone presses CIS team if they can. It'd be helpful!

"PlayerEntered" Script: This cutscene is made with a plugin btw.

local cscript = script:WaitForChild("CutsceneScript")
if script:findFirstChild("SkipCutsceneGuiValue") then
    script.SkipCutsceneGuiValue.Parent = cscript
    script.SkipCutsceneGui.Parent = cscript
end

function onPlayerEntered(player)
    repeat wait () until player.Character
    local new_script = script.CutsceneScript:clone()
    new_script.Parent = player.Character
    new_script.Disabled = false
end

game.Players.PlayerAdded:connect(onPlayerEntered)
onPlayerEntered(game.Players:WaitForChild("Player1")) -- Has to be done since it doesn't work offline for some reason.

If you want to discuss about it on discord instead: blackhoodedguy123#4775

Answer this question