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

why transparency not changing ?

Asked by
tacotown2 119
6 years ago
01--- local script
02local remote = game.ReplicatedStorage.Effect1
03 
04if game.Players.LocalPlayer.PlayerGui.Waitmove:WaitForChild("Logia") then
05    print("Yah")
06   remote:FireServer()
07print("Yah1")
08end
09 
10-- server
11local remote = game.ReplicatedStorage.Effect1
12 
13remote.OnServerEvent:Connect(function()
14game.Players.PlayerAdded:Connect(function(plr)
15    plr.CharacterAdded:Connect(function(char)
View all 26 lines...

it prints Yah and Yah1 but transparency doesnt change pls help me lol

0
Mind if you put prints at the remote? Tell me after that if it prints. Qariter 110 — 6y
0
i tryed to print after the transparency part and diddnt work tacotown2 119 — 6y
0
Is your character R15 or R6 Qariter 110 — 6y
0
Tried using WaitForChild? Amiaa16 3227 — 6y
View all comments (2 more)
0
I just noticed you don't need player added and character added in your OnServerEvent because the player value is a parameter of OnServerEvent. In the () just put plr or player as a parameter, and for the character, just use plr.Character or whatever you have as the player parameter. User#22980 0 — 6y
0
watch alvin blox with rainbow trail i think you need to specify the arm by using char.Player or something AnotherPerson_999 28 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Your script is not working as you are not running the code until a player joins the game. When a player fires (or invokes) a remote event or remote function, the first argument of the callback is the player.

Example:

1local ReplicatedStorage = game:GetService("ReplicatedStorage");
2local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent");
3 
4RemoteEvent.OnServerEvent:Connect(function(player)
5    -- "player" is the player who fired the remote
6    print(player.Name, "just invoked a remote event in ReplicatedStorage :OO")
7end)
Ad

Answer this question