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

Morphs not showing on other players screens?

Asked by 5 years ago

So i reverse engineered a morph giver to be GUI controlled instead of a button you touch, i made it work but it doesnt show the welded parts on other players screens, you can see it welded to you on your screen but others can't see it welded on you. I don't know what to do lol please help

001wait(1)
002local Plr = game.Players.LocalPlayer
003 
004script.Parent.MouseButton1Click:connect(function(r)
005 
006 
007if Plr.Character.UsingMorph.Value == true then
008    Plr.Character.Leg2:remove()
009    Plr.Character.Leg1:remove()
010    Plr.Character.Chest:remove()
011    Plr.Character.Arm2:remove()
012    Plr.Character.Arm1:remove()
013    Plr.Character:findFirstChild("Torso").Transparency = 0
014Plr.Character:findFirstChild("Left Arm").Transparency = 0
015Plr.Character:findFirstChild("Right Arm").Transparency = 0
View all 196 lines...

1 answer

Log in to vote
0
Answered by
pwx 1581 Moderation Voter
5 years ago
Edited 5 years ago

First things first, let's start with the setup to get everything ready before coding.

Step-up 1a. Create a RemoteEvent, put it in ReplicatedStorage. 1b. Name it whatever you want, preferably to something that reminds you what it's for such as 'MorphRemote'. 2a. Create a LocalScript, preferably put it in the UI you have made. 3a. Create a ServerScript, place it in ServerScriptService. 4a. Place your morph elsewhere, such as ServerStorage.

LocalScript

01-- [[ MAIN VARIABLES ]] --
02Player = game.Players.LocalPlayer
03Mouse = Player:GetMouse()
04 
05-- [[ SERVICES ]] --
06RS = game:GetService('ReplicatedStorage')
07 
08-- [[ SIDE VARIABLES ]] --
09Remote = RS:WaitForChild('MorphRemote')
10Button = script.Parent
11 
12-- [[ MAIN SCRIPT ]] --
13 
14Button.MouseButton1Click:Connect(function()
15    Remote:FireServer()
16end) -- button end

ServerScript

01-- [[ SERVICES ]] --
02RS = game:GetService('ReplicatedStorage')
03SS = game:GetService('ServerStorage')
04 
05-- [[ SIDE VARIABLES ]] --
06Remote = RS:WaitForChild('MorphRemote')
07Morph = SS:WaitForChild('Morphy')
08-- [[ MAIN SCRIPT ]] --
09 
10function MorphHandler(Player) -- player is automatically a given variable
11    local Character = Player.Character or Player.CharacterAdded:Wait()
12 
13    if Character:WaitForChild('UsingMorph').Value == true then
14        Character.UsingMorph.Value = false
15        for _,limb in pairs(Character:GetChildren()) do
View all 44 lines...
0
How do i do that? HannahToots 4 — 5y
0
I shall edit the answer accordingly to help you. pwx 1581 — 5y
0
Try this, should work. pwx 1581 — 5y
0
Thank you so much! HannahToots 4 — 5y
View all comments (3 more)
0
It says "- Infinite yield possible on 'ReplicatedStorage:WaitForChild" I'm not quite sure how to fix that i'm not use to doing remote events. HannahToots 4 — 5y
0
Have you created a RemoteEvent and named it 'MorphRemote'? pwx 1581 — 5y
0
Yeah HannahToots 4 — 5y
Ad

Answer this question