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

Door is not a valid member of UnionOperation, Why?

Asked by 4 years ago

I am trying to move my model into a keybind door and everything should work but it says "Door is not a valid member of UnionOperation"..

SCREENSHOTS:

https://gyazo.com/d726e2bc9d02eb399000f462d3136202 - moduleConnector in the union (door)

https://gyazo.com/740561dbdb81504ca44e4120d97cd0b6 - doorEvent in replicatedstorage

https://gyazo.com/f4e8219d15916a20f4b9a1f626e38758 - doorModule in ServerScriptService

https://gyazo.com/5b1dd38d8ec5ccc885b017ea266de439 - doorContext in StarterGui

SCRIPTS: doorModule in serverscriptservice

local main = {}
main.output = {}

local tweenService = game:GetService("TweenService")

local goal = { }
goal.Offset = Vector3.new(5,0,0)

local reset = { }
reset.Offset = Vector3.new(0,0,0)

local tweenInfo = TweenInfo.new(5)

main.output.setupDoor = function(coreModel, player)
    if (coreModel.Position - player.Head.Position).magnitude <5 then
        local tween = tweenService:Create(coreModel.Door, tweenInfo, goal)
        tween:Play()
        coreModel.CanCollide = false
        wait(6)
        local revert = tweenService:Create(coreModel.Door, tweenInfo, reset)
        revert:Play()       coreModel.CanCollide = true
    end
end

return main

moduleConnector in the Union (Door):

local module = require(game:GetService('ServerScriptService').doorModule)
local doorRemote = game.ReplicatedStorage.doorEvent

doorRemote.OnServerEvent:Connect(function(client, event)
    if event == "Open" then
    local char = client.Character
    module.output.setupDoor(script.Parent,char)
    end
end)

doorContext in startergui:

local input = game:GetService("UserInputService")
player = game.Players.LocalPlayer
local char = player.Character


input.InputBegan:connect(function(inp)
    if inp.KeyCode == Enum.KeyCode.E then
    game.ReplicatedStorage.doorEvent:FireServer("Open")
    end
end)
0
which line? SoftlockedUnderZero 668 — 4y
0
a second TheEmperorDupled 2 — 4y
0
17:37:04.430 - Door is not a valid member of UnionOperation 17:37:04.431 - Stack Begin 17:37:04.432 - Script 'ServerScriptService.doorModule', Line 16 17:37:04.432 - Script 'Workspace.Door.moduleConnector', Line 7 17:37:04.433 - Stack End TheEmperorDupled 2 — 4y
0
If you want to change the postion of the door, change "Offset" to Position marine5575 359 — 4y
0
You have to have the same propertiy names as the object you want to move marine5575 359 — 4y

Answer this question