#Cant figure out remote event

13 messages · Page 1 of 1 (latest)

small oasis
#

You probably don’t even need a remote event for this— you can use part.Touched() on the server

#

Also, can we see your explorer tab?

cyan lily
small oasis
# cyan lily i’ve tried. It works but only on server side but not the client side

As long as that part isn’t made by the client, it should be able to be used anywhere. There’s some good documentation on the touched event, so check it out if you’re interested: https://devforum.roblox.com/t/verifying-part-touches-via-the-client-for-client-side-interactions/359133

#

BRB gonna take a shower

iron crescent
#

Yes I would suggest making use of the Touched event directly

Where is this script located? and is it a script, modulescript, or localscript?

game.ReplicatedStorage.WallCollide.OnServerEvent:Connect(function(player)

    local LeftWall = game.Workspace.Obby.LongWallTwo
    local RightWall = game.Workspace.Obby.LongWallOne
    local FrontWall = game.Workspace.Obby.ShortWallOne
    local BackWall = game.Workspace.Obby.ShortwallOne
    
    print("This is working!")

            LeftWall.CanCollide = false
            RightWall.CanCollide = false
            FrontWall.CanCollide = false
            BackWall.CanCollide = false

            task.wait(2)

            if game.Workspace.Obby.LongWallOne.CanCollide == true and game.Workspace.Obby.LongWallTwo.CanCollide == true and game.Workspace.Obby.ShortWallOne.CanCollide == true and game.Workspace.Obby.ShortWallTwo.CanCollide == true then

                print("I hate this") 

            elseif game.Workspace.Obby.LongWallOne.CanCollide == false and game.Workspace.Obby.LongWallTwo.CanCollide == false and game.Workspace.Obby.ShortWallOne.CanCollide == false and game.Workspace.Obby.ShortWallTwo.CanCollide == false then

                print("Finally")


            end
        end
    end) 
end)

same with this, location and type of script?

script.Parent.Touched:Connect(function(player)
    game.ReplicatedStorage.WallCollide:FireServer()
end)
#

Like are any of the scripts inside a part/model, or serverscriptservice, or replciated storage?

#

Also seems like you have too many ```lua
end


```lua
game.ReplicatedStorage.WallCollide.OnServerEvent:Connect(function(player)

    local LeftWall = game.Workspace.Obby.LongWallTwo
    local RightWall = game.Workspace.Obby.LongWallOne
    local FrontWall = game.Workspace.Obby.ShortWallOne
    local BackWall = game.Workspace.Obby.ShortwallOne

    LeftWall.CanCollide = false
    RightWall.CanCollide = false
    FrontWall.CanCollide = false
    BackWall.CanCollide = false

    task.wait(2)
    if game.Workspace.Obby.LongWallOne.CanCollide == true
    and game.Workspace.Obby.LongWallTwo.CanCollide == true
    and game.Workspace.Obby.ShortWallOne.CanCollide == true
    and game.Workspace.Obby.ShortWallTwo.CanCollide == true
    then
        print("I hate this") 
    elseif game.Workspace.Obby.LongWallOne.CanCollide == false 
    and game.Workspace.Obby.LongWallTwo.CanCollide == false
    and game.Workspace.Obby.ShortWallOne.CanCollide == false
    and game.Workspace.Obby.ShortWallTwo.CanCollide == false
    then
      print("Finally"=
    end
end)
rose moat
#

👍👍👍👍 local script in workspace

#

sigmas

cyan lily
iron crescent
rose moat
#
  1. local scripts dont work in workspace
  2. you can do touched event in server
  3. write workspace…., not game.Workspace
  4. use cycle for