funnyfunns
(funnyfunns)
February 12, 2021, 6:31pm
#1
Video:
https://gyazo.com/18938c8b393f668bd6fdc5afa37d2cba
Server:
game.Players.PlayerAdded:Connect(function(plr)
script.Parent.ProximityPrompt.Triggered:Connect(function()
game.ReplicatedStorage.rem.bo1:FireClient(plr)
end)
end)
Locat script:
local Bridge = workspace.Barriers.MainBarrier
local Bridge2 = workspace.Barriers.bridge2Bridge
local Proximity = workspace.Buttons.Button1.ProximityPrompt
local rem = game.ReplicatedStorage.rem.bo1
rem.OnClientEvent:Connect(function(player, plr)
print("test--1")
Bridge2.CanCollide = true
Bridge2.Transparency = 0
Bridge.CanCollide = false
end)
Switch it. Fire the server in the local script. And do whatever you need to on the server.
funnyfunns
(funnyfunns)
February 12, 2021, 6:38pm
#3
But isn’t it gonna show for everyone? Cause I want it only to show to the player who triggered it.
Oh. Then just use a local script instead of a remote event
1 Like
funnyfunns
(funnyfunns)
February 12, 2021, 6:39pm
#5
Okkkkkkkkkkkkkkkkkk! Thanks!! Have a good day
funnyfunns
(funnyfunns)
February 12, 2021, 6:43pm
#6
Sorbious
(Sorbious)
February 12, 2021, 6:45pm
#9
So what exactlly are your overall plans here because I don’t understand.
funnyfunns
(funnyfunns)
February 12, 2021, 6:45pm
#10
It dosent work I put the Gyazo link so you can see the video
funnyfunns
(funnyfunns)
February 12, 2021, 6:46pm
#11
To make a block appear (by changing its transparency)
Is the bridge a part or a model?
Sorbious
(Sorbious)
February 12, 2021, 6:47pm
#13
What type of object is the Bridge2? let us see the explorer
funnyfunns
(funnyfunns)
February 12, 2021, 6:49pm
#15
bridge 2 is a wedge named (bridge2bridge)
funnyfunns
(funnyfunns)
February 12, 2021, 6:50pm
#16
and main barrier is just a barrier blocking the entrance
OnClientEvent
doesn’t return a player as the first parameter because you’re already in a local script.
funnyfunns
(funnyfunns)
February 12, 2021, 6:54pm
#18
its not running on a remoteevent
Sorbious
(Sorbious)
February 12, 2021, 6:56pm
#19
Script:
-- Create a new script and parent it inside the ProximityPrompt
local Proximity = script.Parent
Proximity.Triggered:Connect(function(playerWhoTriggered) --Theres a parameter built in if someone who triggered the proximity prompt (As well as for ClickDetectors)
game.ReplicatedStorage.rem.bo1:FireClient(playerWhoTriggered)
end)
LocalScript:
local Bridge = workspace.Barriers.MainBarrier
local Bridge2 = workspace.Barriers.bridge2Bridge
local rem = game.ReplicatedStorage.rem.bo1
rem.OnClientEvent:Connect(function()
print("test--1")
Bridge2.CanCollide = true
Bridge2.Transparency = 0
Bridge.CanCollide = false
end)
1 Like
funnyfunns
(funnyfunns)
February 12, 2021, 6:59pm
#21
Never mind! ITS WORKING!!!
1 Like
funnyfunns
(funnyfunns)
February 12, 2021, 7:01pm
#22
Nvermind again. I thought it works not working